]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: Reset cached PSR parameters after hibernate
authorEvgenii Krasnikov <Evgenii.Krasnikov@amd.com>
Tue, 5 Apr 2022 14:59:27 +0000 (10:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 25 Apr 2022 21:10:29 +0000 (17:10 -0400)
[WHY]
After hibernate system might be using old invalid psr_power_opt and
psr_allow_active that never get reset

[HOW]
Reset cached Panel Self Refresh parameters when PSR is first configured
for eDP in dc_link_setup_psr.

Reviewed-by: Harry Vanzylldejong <harry.vanzylldejong@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Evgenii Krasnikov <Evgenii.Krasnikov@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c

index 3d13ee32a3dbfb597ae0e2169a511bee20cc544d..1eddf2785153e4809a36d28d49bcdbd22d1a5b0c 100644 (file)
@@ -3317,9 +3317,14 @@ bool dc_link_setup_psr(struct dc_link *link,
         */
        psr_context->frame_delay = 0;
 
-       if (psr)
+       if (psr) {
                link->psr_settings.psr_feature_enabled = psr->funcs->psr_copy_settings(psr,
                        link, psr_context, panel_inst);
+               if (link->psr_settings.psr_feature_enabled) {
+                       link->psr_settings.psr_power_opt = 0;
+                       link->psr_settings.psr_allow_active = 0;
+               }
+       }
        else
                link->psr_settings.psr_feature_enabled = dmcu->funcs->setup_psr(dmcu, link, psr_context);