From: Mario Limonciello <mario.limoncie...@amd.com>

[Why]
PSR support could vary from the panels connected to one GPU versus
another.

[How]
Move PSR support message into amdgpu_dm which has the scope of the
GPU and use that information.

Reviewed-by: Alex Hung <alex.h...@amd.com>
Signed-off-by: Mario Limonciello <mario.limoncie...@amd.com>
Signed-off-by: Roman Li <roman...@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c     | 9 ++++++++-
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 8 --------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 65162e581fae..7cfb6fb89fca 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5388,8 +5388,15 @@ static int amdgpu_dm_initialize_drm_device(struct 
amdgpu_device *adev)
                                        if (amdgpu_dm_set_replay_caps(link, 
aconnector))
                                                psr_feature_enabled = false;
 
-                               if (psr_feature_enabled)
+                               if (psr_feature_enabled) {
                                        amdgpu_dm_set_psr_caps(link);
+                                       drm_info(adev_to_drm(adev), "PSR 
support %d, DC PSR ver %d, sink PSR ver %d DPCD caps 0x%x su_y_granularity 
%d\n",
+                                                
link->psr_settings.psr_feature_enabled,
+                                                link->psr_settings.psr_version,
+                                                
link->dpcd_caps.psr_info.psr_version,
+                                                
link->dpcd_caps.psr_info.psr_dpcd_caps.raw,
+                                                
link->dpcd_caps.psr_info.psr2_su_y_granularity_cap);
+                               }
                        }
                }
                amdgpu_set_panel_orientation(&aconnector->base);
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
index e140b7a04d72..f984cb0cb889 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
@@ -87,14 +87,6 @@ void amdgpu_dm_set_psr_caps(struct dc_link *link)
 
                link->psr_settings.psr_feature_enabled = true;
        }
-
-       DRM_INFO("PSR support %d, DC PSR ver %d, sink PSR ver %d DPCD caps 0x%x 
su_y_granularity %d\n",
-               link->psr_settings.psr_feature_enabled,
-               link->psr_settings.psr_version,
-               link->dpcd_caps.psr_info.psr_version,
-               link->dpcd_caps.psr_info.psr_dpcd_caps.raw,
-               link->dpcd_caps.psr_info.psr2_su_y_granularity_cap);
-
 }
 
 /*
-- 
2.34.1

Reply via email to