From: Alvin Lee <alvin.l...@amd.com>

[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.chalm...@amd.com>
Acked-by: Qingqing Zhuo <qingqing.z...@amd.com>
Signed-off-by: Alvin Lee <alvin.l...@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
index b2919104ffc7..b3824287c224 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
@@ -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);
                }
-- 
2.34.1

Reply via email to