This is a note to let you know that I've just added the patch titled

    drm/amdgpu: clarify DC checks

to the 6.1-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amdgpu-clarify-dc-checks.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From [email protected] Sat Mar 21 06:45:17 2026
From: Rosen Penev <[email protected]>
Date: Fri, 20 Mar 2026 22:44:51 -0700
Subject: drm/amdgpu: clarify DC checks
To: [email protected]
Cc: "Alex Deucher" <[email protected]>, "Christian König" 
<[email protected]>, "Pan, Xinhui" <[email protected]>, "David Airlie" 
<[email protected]>, "Daniel Vetter" <[email protected]>, "Harry Wentland" 
<[email protected]>, "Leo Li" <[email protected]>, "Rodrigo Siqueira" 
<[email protected]>, "Evan Quan" <[email protected]>, "Mario 
Limonciello" <[email protected]>, "Sasha Levin" <[email protected]>, 
"Rosen Penev" <[email protected]>, "Lijo Lazar" <[email protected]>, "Ma Jun" 
<[email protected]>, "Greg Kroah-Hartman" <[email protected]>, 
"Srinivasan Shanmugam" <[email protected]>, "Mario Limonciello 
(AMD)" <[email protected]>, "Zhigang Luo" <[email protected]>, "Bert 
Karwatzki" <[email protected]>, "Ray Wu" <[email protected]>, "Wayne Lin" 
<[email protected]>, "Roman Li" <[email protected]>, "Hersen Wu" 
<[email protected]>, "Timur Kristóf" <[email protected]>, "Alex Hung" 
<[email protected]>, decce6 <[email protected]>, "Went
 ao Liang" <[email protected]>, [email protected] (open list:RADEON 
and AMDGPU DRM DRIVERS), [email protected] (open list:DRM 
DRIVERS), [email protected] (open list)
Message-ID: <[email protected]>

From: Alex Deucher <[email protected]>

[ 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önig <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 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 -
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |    1 
 drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c  |    2 -
 8 files changed, 25 insertions(+), 21 deletions(-)

--- 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;
 
        bool                            job_hang;
+       bool                            dc_enabled;
 };
 
 static inline struct amdgpu_device *drm_to_adev(struct drm_device *ddev)
--- 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_devic
        struct amdgpu_atif *atif = &amdgpu_acpi_priv.atif;
 
        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 = &adev->dm;
 
--- 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_de
        amdgpu_ta_if_debugfs_init(adev);
 
 #if defined(CONFIG_DRM_AMD_DC)
-       if (amdgpu_device_has_dc_support(adev))
+       if (adev->dc_enabled)
                dtn_debugfs_init(adev);
 #endif
 
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -4404,25 +4404,27 @@ int amdgpu_device_resume(struct drm_devi
 
        amdgpu_ras_resume(adev);
 
-       /*
-        * 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 = false;
 
        if (adev->enable_mes)
--- 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_domain
         */
        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 |= AMDGPU_GEM_DOMAIN_GTT;
 #endif
@@ -1330,7 +1330,7 @@ int amdgpu_display_modeset_create_props(
                                         "dither",
                                         amdgpu_dither_enum_list, sz);
 
-       if (amdgpu_device_has_dc_support(adev)) {
+       if (adev->dc_enabled) {
                adev->mode_info.abm_level_property =
                        drm_property_create_range(adev_to_drm(adev), 0,
                                                  "abm level", 0, 4);
--- 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_dis
                if (ret)
                        return ret;
 
-               if (amdgpu_device_has_dc_support(adev)) {
+               if (adev->dc_enabled) {
                        struct drm_crtc *crtc;
 
                        drm_for_each_crtc(crtc, drm_dev) {
--- 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 = true;
 
        return 0;
 }
--- 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 *h
        struct pp_hwmgr *hwmgr = handle;
        struct amdgpu_device *adev = hwmgr->adev;
 
-       if (!amdgpu_device_has_dc_support(adev)) {
+       if (!adev->dc_enabled) {
                amdgpu_dpm_get_active_displays(adev);
                adev->pm.pm_display_cfg.num_display = 
adev->pm.dpm.new_active_crtc_count;
                adev->pm.pm_display_cfg.vrefresh = 
amdgpu_dpm_get_vrefresh(adev);


Patches currently in stable-queue which might be from [email protected] are

queue-6.1/drm-amdgpu-clarify-dc-checks.patch
queue-6.1/drm-amd-pm-use-pm_display_cfg-in-legacy-dpm-v2.patch
queue-6.1/drm-amdgpu-use-proper-dc-check-in-amdgpu_display_supported_domains.patch
queue-6.1/drm-amd-display-add-pixel_clock-to-amd_pp_display_configuration.patch

Reply via email to