drm/amd/display: Only keep cursor p-state force for FPO
authorAlvin Lee <Alvin.Lee2@amd.com>
Fri, 17 Mar 2023 18:08:55 +0000 (14:08 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 31 Mar 2023 15:18:54 +0000 (11:18 -0400)
[Description]
If transitioning from an FPO config -> FPO config, we want
to keep cursor P-State force disallowed. Any other transition
from FPO config -> non FPO config should unforce the cursor
P-State disallow

Reviewed-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@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/dcn32/dcn32_hwseq.c

index b291910..b382428 100644 (file)
@@ -591,6 +591,12 @@ void dcn32_update_force_pstate(struct dc *dc, struct dc_state *context)
                                                pipe->stream->fpo_in_use))) {
                        if (hubp && hubp->funcs->hubp_update_force_pstate_disallow)
                                hubp->funcs->hubp_update_force_pstate_disallow(hubp, false);
+               }
+
+               /* Today only FPO uses cursor P-State force. Only clear cursor P-State force
+                * if it's not FPO.
+                */
+               if (!pipe->stream || (pipe->stream && !pipe->stream->fpo_in_use)) {
                        if (hubp && hubp->funcs->hubp_update_force_cursor_pstate_disallow)
                                hubp->funcs->hubp_update_force_cursor_pstate_disallow(hubp, false);
                }