]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Avoid configuring PSR granularity if PSR-SU not supported
authorMario Limonciello <mario.limonciello@amd.com>
Sun, 6 Jul 2025 13:38:05 +0000 (08:38 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Jul 2025 20:28:28 +0000 (16:28 -0400)
[Why]
If PSR-SU is disabled on the link, then configuring su_y granularity in
mod_power_calc_psr_configs() can lead to assertions in
psr_su_set_dsc_slice_height().

[How]
Check the PSR version in amdgpu_dm_link_setup_psr() to determine whether
or not to configure granularity.

Reviewed-by: Sun peng (Leo) Li <sunpeng.li@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c

index f984cb0cb88976695451a51cc40c26e8d22017a7..ff7b867ae98b88a357a98d6656c8be6bd74f91aa 100644 (file)
@@ -119,8 +119,10 @@ bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream)
                psr_config.allow_multi_disp_optimizations =
                        (amdgpu_dc_feature_mask & DC_PSR_ALLOW_MULTI_DISP_OPT);
 
-               if (!psr_su_set_dsc_slice_height(dc, link, stream, &psr_config))
-                       return false;
+               if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1) {
+                       if (!psr_su_set_dsc_slice_height(dc, link, stream, &psr_config))
+                               return false;
+               }
 
                ret = dc_link_setup_psr(link, stream, &psr_config, &psr_context);