From nobody Sat Apr 18 12:48:23 2026 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29731262D0B for ; Sat, 28 Feb 2026 01:12:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772241155; cv=none; b=lZ2sd0NOnqw232IIc5xaLXJE6F4ULGu+wRtWElHXNOK24yHyB45Lu1hR2qxve0OX2lmHBnQ5/i4Ewk2WOGprWbJxJXPKVCbg5buUysPfC1IQ4rzrEND1C8zXQZP7QLtUKDyiayWg7xGFpmnBc+Z7tOdF8k9n4nQnL6NCfVpRObI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772241155; c=relaxed/simple; bh=2fgpAJxAhO7eMnf/Eh+Xn8+D54I0ZQC9KZDqKhydZMc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XK+oEcfQVyAA0oNQ5aDar3EjGhnBLs5Kql1RaenqMW13X+27fwafL1oJnTr/hKkUpkbTul51zjjynuDfk1mNFsBTAEbzzYKbGEQbqCKCvtcHQtq7XfrGrxrw87OiqItyOiFqO7f1DRbne+2e4tSyxAXfj0NQlrB1tUVE76XbDTA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Lkn2NIEj; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Lkn2NIEj" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-82735a41985so1564152b3a.2 for ; Fri, 27 Feb 2026 17:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772241153; x=1772845953; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UVWvXlolIB1z5Wdh/ZWEpJ69krVbfULM/4hKT6Ylcj4=; b=Lkn2NIEjgmom/2ypClCi9VR5H5pqVuD591tbVVeCLwW0HQSlfqUk0dGUW0Q/+YxjRV YF/heraX2+JeFkFGlPCx1bClrW8kHP4D/IKoTQriDHLVs3++3A+Qen3WmZGUuWC/QnaU TTJwv8kM2pLFiYgO+3s2jRZ5+990S4nUvjQ6Dt5vIIm6Ti6XTz5Y9PIYwitckNzwAKEW qcQ3CDPt3jnLif16a2ppdyaIntXTbnb8Bs3S3v0wKhspjJfvMMtAyWFIzpt1o7KDDIwn RFkR2IR9cyO+o+rf8LHrOrEtFkJULCq0urs78a2E9mkZYl01W+xpdvJpVwHH5nbSz3c+ lSag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772241153; x=1772845953; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UVWvXlolIB1z5Wdh/ZWEpJ69krVbfULM/4hKT6Ylcj4=; b=KcikseLrRwX/Tl7vP4c1IpxyYjCFK0B2ahBQImmvA1tGcXZ7BdfwXuIV3LrX2kH41p fBoUz17sAOTndV0Dla9BMFiqDDuhlgyyuN6PkXtcBLkY1pi2WeFzqzSlJOlLVbMxxwte Enm4aAubVBJiZdfq/GZgZyYLwMc0FO6Dihkk70u/M3KR3BnFOKedJ6QyJXZPaatG+Nek GNL9CwOEWprAMBywaw5tWiofLDSomuXnfTVULdsK0Lz+3WyH30KtWimCGf189wFcoTc7 IvtqIRglnOmAQPSmWGqp4Gch920Bk1qiAn2s44WSsU8ChWSFW+76BQ2raP0SJoaaI/A7 MwmA== X-Forwarded-Encrypted: i=1; AJvYcCWQzWFsDxl9Lle0cfhdgBxERb8pr76UcnFv1bPHI+bL4ch7dkQTdBy+6qkMkYRoPgdr0IY/NREGP+mNobQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxcqJ2sf38X7jbd43apHyyAWxiaQHVyKpstlAFrZgHUcelnOAI0 SKUIMPUDfaglBzj1A83LYSB6Gy3spCGIeLDFxJakiqI+HqJjJhsD8fvG X-Gm-Gg: ATEYQzw+rIMv7e47aUbtW5F3/6+2C8p51LRYdvcp2mcaNmcoOUjeBlKhrXtXPCbcmmB oqLPH4uRKFJywYYbYAsXANiJ+M7hvKAqbZ6iNR39XN8X2KmXxyDlXrhvhov9XgzS053acPelxKr DiENYH2wpAqdKBDaE9+9uwEYBg3aqv2cC36T548XPdpFbZWYEn9WsrYPnypdXJwwdqlXJI4mrGG BcJlc70i4QUNzBfQT3paiE1tyIwTsur3Z51hPoJKIH+cvJuUvvdLACOuSMa8v+haVDS/bSK98dJ bZMmyX/SsvP0h5/pz5A9ZEo2wKTE+m7g2VXUrQWhviP36hoxE2sP+uq2eFOqITIkbXi2xYCfMRl vDIXUmkXbjeXs4skjrPQpZ8zq4LxIk7/q1R/VPzAUTWHC98I2Z7MJNka75HXmi6ZDmkoiW/qBK8 ZF3+kf+0lB3eouITvzwW5WOq2Fjc0IKvBZms/nzkEayg8giApi2HVgVQ== X-Received: by 2002:a05:6a20:56a3:b0:395:1200:3abd with SMTP id adf61e73a8af0-395c3b45943mr4205836637.62.1772241153329; Fri, 27 Feb 2026 17:12:33 -0800 (PST) Received: from ryzen ([2601:644:8000:56f5::8bd]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2adfb6f46c2sm75772845ad.89.2026.02.27.17.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 17:12:32 -0800 (PST) From: Rosen Penev To: stable@vger.kernel.org Cc: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Harry Wentland , Leo Li , Rodrigo Siqueira , Evan Quan , Sasha Levin , Mario Limonciello , Eliav Farber , Lijo Lazar , Ma Jun , Greg Kroah-Hartman , Zhigang Luo , Srinivasan Shanmugam , Bert Karwatzki , Ray Wu , Wayne Lin , Roman Li , Hersen Wu , Wentao Liang , amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH for 6.1 1/2] drm/amdgpu: use proper DC check in amdgpu_display_supported_domains() Date: Fri, 27 Feb 2026 17:12:12 -0800 Message-ID: <20260228011213.423524-2-rosenp@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260228011213.423524-1-rosenp@gmail.com> References: <20260228011213.423524-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Alex Deucher [ Upstream commit 96ce96f8773da4814622fd97e5226915a2c30706 ] amdgpu_device_asic_has_dc_support() just checks the asic itself. amdgpu_device_has_dc_support() is a runtime check which not only checks the asic, but also other things in the driver like whether virtual display is enabled. We want the latter here. Acked-by: Christian K=C3=B6nig Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/= amd/amdgpu/amdgpu_display.c index cd0bccc95205..98cce09684f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -534,7 +534,7 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu= _device *adev, */ if ((bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) && amdgpu_bo_support_uswc(bo_flags) && - amdgpu_device_asic_has_dc_support(adev->asic_type) && + amdgpu_device_has_dc_support(adev) && adev->mode_info.gpu_vm_support) domain |=3D AMDGPU_GEM_DOMAIN_GTT; #endif --=20 2.53.0 From nobody Sat Apr 18 12:48:23 2026 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8146A2E2679 for ; Sat, 28 Feb 2026 01:12:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772241157; cv=none; b=Sqp3c8Fj7PjFhe2Mmqk67375uXEBpjL77/HsNWomCapcNj7ucDquJPlsGoqbZHtmQxfcPEvW7LHimijecY8EH2HgkKQLb3KWjkamNZIrPeilnxHmZY7pxQ97Pmf0cjMi85QOL+wSa1QjMnb80IBD2YEMy3HX/QJrpEAvfaJk6Wo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772241157; c=relaxed/simple; bh=/2IufbmKgS8EWPwFqYgpHFq+mUhoBXzmJsBRcVZFpMM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iAN8J3CkXs1sPG/H+WyBXr0T+mAZ3wzBtzX3n0bdYJ82c2xWh/NiD28c+G+0x2fIKydAr8anSbF5IQtGLe9fDAnlOP7ziynltzYXMoJ8DSOThFUubXGbuRyOT6ywHmEot5dKcsHYNOP0yyVsdZzdU/y7bbHXeSx2l+BUQUmtJGA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FIfN90wo; arc=none smtp.client-ip=209.85.214.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FIfN90wo" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2add623cb27so17707175ad.3 for ; Fri, 27 Feb 2026 17:12:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772241156; x=1772845956; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=T7pjsQqLYlC7MiskgqQ4KF6moeG8nJU49gJ0m6tNxws=; b=FIfN90wog8N3TxFZVJK/OTJjyvjI/sRwUBh1pVhgSEjwav6YNSI5Kjmjjvd4Vdov7z TluDmDq9Z77FO9ouLJ1n9dyed6ZLwzQEyKZXcu57rwQeJ8/8jglMPTDaqZtbl0tPMRrZ DOM+IIRqso0Ec6SF92PQk3lBMNms3sQDfpLkp+hDbyqFFq/6d4y6kUKIVYz27G/0SPJO UP3xMtqGwk5pB+wP4iQnENjYVY5uH6yX751Oxrx5zTotY4uuNcLN5hheKXgWLzzcgtb3 VHwNwta4Lz8Tu7mGE2vkpth1ie1wvgoqi+MKB/TD0vUsGBTMSEXHmaQFtAF3JRcUeBTz b3qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772241156; x=1772845956; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=T7pjsQqLYlC7MiskgqQ4KF6moeG8nJU49gJ0m6tNxws=; b=Lyt+5KWObjd/VGRyFZ0I5dwCVCq2201+5Roa9LYwltRLM/+mSTf7gyskcx90yuFplS ZjZ7B12xaz7zBW9OAUVcbbBVHMHEl+2e0TMdeF4FtOYnbNH4lpshUxEn9zD9YA8F5u7G TfBRRCU8HATidiM6qC1JMr7U+sEqvK/ABkD/u+rhJXhvTdZPEhLYxxtZZFVb+jO/tjyI AWzlHixuZTAn22M+ydEgt7OJh4uXSPkZ1QN7J2ClpJJjOyWOCKP8dV+qbm7uOcox7oZ7 vvPALRyHSPUy7T7BkPtWjRNyP72UKAwYruK24zPSMW8RanurlkJ0t5ohgRe9fvX19cLi ea4g== X-Forwarded-Encrypted: i=1; AJvYcCX2wI/K2N+5tg08pkx2g82I+rWQ5qJLvUPlDf1QTkuAAoxNC9DnyEKJb4H77i/UgQ3cuSU4A14XpYBkV0Q=@vger.kernel.org X-Gm-Message-State: AOJu0YwEjXiVqk2ubMJK7TjNRtyPXPsNxC4SSp7S/sala7miSxZK8kcb q2e5gCWloEUDWoYMnmPhmQgBBqYQce8Vi6OWIvCsP6KtB01d5VqzKgaa X-Gm-Gg: ATEYQzwqtW+Wy0c0QpAKyK5YU2tPprk+p4lqthpaCfysT+44GpeWxXw8w6azZfEVB5W zNl0LG8tzSXogxB8a4u3ajElCWSpgJXSlwdNlTe6UTcfrXLprK7X7ZQMak1yRXALravsaC0UHYM 9TvolDoZhrDke0LhdSINmf0QMM8/uCzYjTRqUUO8/HAiJy4cidQH1R93GHziXXunCahI0JWTJXG 6TNWsZwe4XlyvShwO/iafTypdjHc69MQJR7AFsy9Fl2YQd80BeXHLPnQCosbhWTTXIpQUjAhrKM kmYh56aw3w+3/nwm1eq4vwsNzGyvkHOHNKkoP34HIsVa6h1g2XdbEoYRWbQt7cYpzfN2i9xt32N u2+bqh2A4isbYzdLmqZtcna8pSqFn/BraXEo8TGzD39Jlir+9DvOksi3YPW64g6PPsYuOcM7sAs bcY+X7SdeCXIY0qvdd1viaIDWQ3X4b2y/LcUZtSIaJc9wm/pxczOA1MA== X-Received: by 2002:a17:902:e84f:b0:2a9:62ce:1c0c with SMTP id d9443c01a7336-2ae2e251993mr44077005ad.6.1772241155506; Fri, 27 Feb 2026 17:12:35 -0800 (PST) Received: from ryzen ([2601:644:8000:56f5::8bd]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2adfb6f46c2sm75772845ad.89.2026.02.27.17.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Feb 2026 17:12:34 -0800 (PST) From: Rosen Penev To: stable@vger.kernel.org Cc: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Harry Wentland , Leo Li , Rodrigo Siqueira , Evan Quan , Sasha Levin , Mario Limonciello , Eliav Farber , Lijo Lazar , Ma Jun , Greg Kroah-Hartman , Zhigang Luo , Srinivasan Shanmugam , Bert Karwatzki , Ray Wu , Wayne Lin , Roman Li , Hersen Wu , Wentao Liang , amd-gfx@lists.freedesktop.org (open list:RADEON and AMDGPU DRM DRIVERS), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH for 6.1 2/2] drm/amdgpu: clarify DC checks Date: Fri, 27 Feb 2026 17:12:13 -0800 Message-ID: <20260228011213.423524-3-rosenp@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260228011213.423524-1-rosenp@gmail.com> References: <20260228011213.423524-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Alex Deucher [ Upstream commit d09ef243035b75a6d403ebfeb7e87fa20d7e25c6 ] There are several places where we don't want to check if a particular asic could support DC, but rather, if DC is enabled. Set a flag if DC is enabled and check for that rather than if a device supports DC or not. Acked-by: Christian K=C3=B6nig Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 32 ++++++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 4 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + .../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 2 +- 8 files changed, 25 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdg= pu/amdgpu.h index dcb5de01a220..c4287e09658f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1071,6 +1071,7 @@ struct amdgpu_device { struct work_struct reset_work; =20 bool job_hang; + bool dc_enabled; }; =20 static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd= /amdgpu/amdgpu_acpi.c index 5fa7f6d8aa30..9ced0c60ec8b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c @@ -857,7 +857,7 @@ int amdgpu_acpi_init(struct amdgpu_device *adev) struct amdgpu_atif *atif =3D &amdgpu_acpi_priv.atif; =20 if (atif->notifications.brightness_change) { - if (amdgpu_device_has_dc_support(adev)) { + if (adev->dc_enabled) { #if defined(CONFIG_DRM_AMD_DC) struct amdgpu_display_manager *dm =3D &adev->dm; =20 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/= amd/amdgpu/amdgpu_debugfs.c index 3cca3f07f34d..11bfbf1d6a3d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -1981,7 +1981,7 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev) amdgpu_ta_if_debugfs_init(adev); =20 #if defined(CONFIG_DRM_AMD_DC) - if (amdgpu_device_has_dc_support(adev)) + if (adev->dc_enabled) dtn_debugfs_init(adev); #endif =20 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/a= md/amdgpu/amdgpu_device.c index 535cc74c5880..a43f18defa7a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4402,25 +4402,27 @@ int amdgpu_device_resume(struct drm_device *dev, bo= ol fbcon) =20 amdgpu_ras_resume(adev); =20 - /* - * Most of the connector probing functions try to acquire runtime pm - * refs to ensure that the GPU is powered on when connector polling is - * performed. Since we're calling this from a runtime PM callback, - * trying to acquire rpm refs will cause us to deadlock. - * - * Since we're guaranteed to be holding the rpm lock, it's safe to - * temporarily disable the rpm helpers so this doesn't deadlock us. - */ + if (adev->mode_info.num_crtc) { + /* + * Most of the connector probing functions try to acquire runtime pm + * refs to ensure that the GPU is powered on when connector polling is + * performed. Since we're calling this from a runtime PM callback, + * trying to acquire rpm refs will cause us to deadlock. + * + * Since we're guaranteed to be holding the rpm lock, it's safe to + * temporarily disable the rpm helpers so this doesn't deadlock us. + */ #ifdef CONFIG_PM - dev->dev->power.disable_depth++; + dev->dev->power.disable_depth++; #endif - if (!amdgpu_device_has_dc_support(adev)) - drm_helper_hpd_irq_event(dev); - else - drm_kms_helper_hotplug_event(dev); + if (!adev->dc_enabled) + drm_helper_hpd_irq_event(dev); + else + drm_kms_helper_hotplug_event(dev); #ifdef CONFIG_PM - dev->dev->power.disable_depth--; + dev->dev->power.disable_depth--; #endif + } adev->in_suspend =3D false; =20 if (adev->enable_mes) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/= amd/amdgpu/amdgpu_display.c index 98cce09684f2..f9692e724409 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -534,7 +534,7 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu= _device *adev, */ if ((bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) && amdgpu_bo_support_uswc(bo_flags) && - amdgpu_device_has_dc_support(adev) && + adev->dc_enabled && adev->mode_info.gpu_vm_support) domain |=3D AMDGPU_GEM_DOMAIN_GTT; #endif @@ -1330,7 +1330,7 @@ int amdgpu_display_modeset_create_props(struct amdgpu= _device *adev) "dither", amdgpu_dither_enum_list, sz); =20 - if (amdgpu_device_has_dc_support(adev)) { + if (adev->dc_enabled) { adev->mode_info.abm_level_property =3D drm_property_create_range(adev_to_drm(adev), 0, "abm level", 0, 4); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_drv.c index 055e05b2cb22..3c01bb464248 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -2530,7 +2530,7 @@ static int amdgpu_runtime_idle_check_display(struct d= evice *dev) if (ret) return ret; =20 - if (amdgpu_device_has_dc_support(adev)) { + if (adev->dc_enabled) { struct drm_crtc *crtc; =20 drm_for_each_crtc(crtc, drm_dev) { diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gp= u/drm/amd/display/amdgpu_dm/amdgpu_dm.c index f7fbc7932bb5..0d41a13c9019 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4842,6 +4842,7 @@ static int dm_early_init(void *handle) adev_to_drm(adev)->dev, &dev_attr_s3_debug); #endif + adev->dc_enabled =3D true; =20 return 0; } diff --git a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c b/drivers/gpu= /drm/amd/pm/powerplay/amd_powerplay.c index ab8ae7464664..9bf85ca607c3 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c @@ -1567,7 +1567,7 @@ static void pp_pm_compute_clocks(void *handle) struct pp_hwmgr *hwmgr =3D handle; struct amdgpu_device *adev =3D hwmgr->adev; =20 - if (!amdgpu_device_has_dc_support(adev)) { + if (!adev->dc_enabled) { amdgpu_dpm_get_active_displays(adev); adev->pm.pm_display_cfg.num_display =3D adev->pm.dpm.new_active_crtc_cou= nt; adev->pm.pm_display_cfg.vrefresh =3D amdgpu_dpm_get_vrefresh(adev); --=20 2.53.0