Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp191465imj; Thu, 14 Feb 2019 18:20:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IYlpIYoN0+jImJuE74V6JYQemcOAcd3+wrf9ZFx8ppMgK3r+XbPC/6sg+BXLlcbbQGuVUtj X-Received: by 2002:a63:235f:: with SMTP id u31mr3035785pgm.122.1550197243389; Thu, 14 Feb 2019 18:20:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550197243; cv=none; d=google.com; s=arc-20160816; b=d+RakXqVp6Rsl/tb/yCFS4lQXMJsRJyYfdrQUG0rrkyoN1T05g4zc1B6Pc1v2zlKzS Ue8qmpPzq1qR6i8jE62KwNtoHOwP/yOmkJYb7iFbk2bRTVNpCi3YtJWDGPGWvrzJjuU1 HV10MNFBRhCnNI1yutJ3dM98Esoif7zpGSBpX86R/7qEZuSzrOCxB4CVe2CjfRyKZxaM uexk8bL8QJPX57+SnSoxJ7PSDDNyHEvcmnsdsJZQUaquSKFGm2rM4ugpSMgaf9mZ8KaW c5RDHwZJMTsiSLLfQwF6XpbjOblwXxyBWZb3QesHNmY+6V2iKZ4V920o+rQtGXXhymSA Ha5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=1PTH84qLVrCbBy9xppdCr77VMWTrtaV2yscDtXqaEjM=; b=HuTS5d9wfn+FtmpJ5aQeEmFExeEhOXLBqIy5/W8ex82qiBfreFPOYSLp6yngGl3tAZ opC1q/EdsZ7vxRv1Nr90QH7L8N/CicifMCnKsK2Dp62aBNJ3RQCTGB0QtfhpblgvgKR5 XzD+ASMqp301SpJF726dMnCvj/p75+/YruefbKLgISPLn3Q+XEsAw9J6UEXZfc1PuuVE po85sJMQ0kNGgAxYCdWSaHVkboALe0Z+626u3kFGe3MgEJuSJsHB7ye/Nl3H9BWTwwuL QbJoGqjwL9j+c2WqLujfqbbYjJnk8nAJGiqNIEaf/po0Ny68y6kKlzvWcQOLUD9+WLIj jeCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o123si4342683pfb.76.2019.02.14.18.20.27; Thu, 14 Feb 2019 18:20:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726336AbfBNWrm convert rfc822-to-8bit (ORCPT + 99 others); Thu, 14 Feb 2019 17:47:42 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:50028 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725818AbfBNWrm (ORCPT ); Thu, 14 Feb 2019 17:47:42 -0500 Received: from 79.184.254.36.ipv4.supernova.orange.pl (79.184.254.36) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id 957c4661cfdee465; Thu, 14 Feb 2019 23:47:39 +0100 From: "Rafael J. Wysocki" To: Alex Deucher Cc: Christian =?ISO-8859-1?Q?K=F6nig?= , David Zhou , amd-gfx@lists.freedesktop.org, LKML , Linux PM , =?utf-8?B?0K/RgNC+0YHQu9Cw0LIg0KHQtdC80YfQtdC90LrQvg==?= Subject: [PATCH] gpu: drm: radeon: Set DPM_FLAG_NEVER_SKIP when enabling PM-runtime Date: Thu, 14 Feb 2019 23:46:19 +0100 Message-ID: <2281684.8tZHfIXjiu@aspire.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki On HP ProBook 4540s, if PM-runtime is enabled in the radeon driver and the direct-complete optimization is used for the radeon device during system-wide suspend, the system doesn't resume. Preventing direct-complete from being used with the radeon device by setting the DPM_FLAG_NEVER_SKIP driver flag for it makes the problem go away, which indicates that direct-complete is not safe for the radeon driver in general and should not be used with it (at least for now). This fixes a regression introduced by commit c62ec4610c40 ("PM / core: Fix direct_complete handling for devices with no callbacks") which allowed direct-complete to be applied to devices without PM callbacks (again) which in turn unlocked direct-complete for radeon on HP ProBook 4540s. Fixes: c62ec4610c40 ("PM / core: Fix direct_complete handling for devices with no callbacks") Link: https://bugzilla.kernel.org/show_bug.cgi?id=201519 Reported-by: Ярослав Семченко Tested-by: Ярослав Семченко Signed-off-by: Rafael J. Wysocki --- drivers/gpu/drm/radeon/radeon_kms.c | 1 + 1 file changed, 1 insertion(+) Index: linux-pm/drivers/gpu/drm/radeon/radeon_kms.c =================================================================== --- linux-pm.orig/drivers/gpu/drm/radeon/radeon_kms.c +++ linux-pm/drivers/gpu/drm/radeon/radeon_kms.c @@ -172,6 +172,7 @@ int radeon_driver_load_kms(struct drm_de } if (radeon_is_px(dev)) { + dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP); pm_runtime_use_autosuspend(dev->dev); pm_runtime_set_autosuspend_delay(dev->dev, 5000); pm_runtime_set_active(dev->dev);