drm/amd/display: For cursor P-State allow for SubVP
authorAlvin Lee <alvin.lee2@amd.com>
Mon, 23 Oct 2023 18:33:16 +0000 (14:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Nov 2023 17:03:30 +0000 (12:03 -0500)
[Description]
- Similar to FPO, SubVP should also force cursor P-State
  allow instead of relying on natural assertion
- Implement code path to force and unforce cursor P-State
  allow for SubVP

Reviewed-by: Samson Tam <samson.tam@amd.com>
Acked-by: Hersen Wu <hersenxs.wu@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/hwss/dcn32/dcn32_hwseq.c

index 1b9f21fd4f1732989bc8b63e43cda974c254ff5a..6a65af8c36b904fdb1cb3308a149174925c3b404 100644 (file)
@@ -615,12 +615,6 @@ 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->fpo_in_use) {
                        if (hubp && hubp->funcs->hubp_update_force_cursor_pstate_disallow)
                                hubp->funcs->hubp_update_force_cursor_pstate_disallow(hubp, false);
                }
@@ -632,17 +626,10 @@ void dcn32_update_force_pstate(struct dc *dc, struct dc_state *context)
                struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
                struct hubp *hubp = pipe->plane_res.hubp;
 
-               if (pipe->stream && pipe->plane_state && pipe->stream->mall_stream_config.type == SUBVP_MAIN) {
+               if (pipe->stream && (pipe->stream->mall_stream_config.type == SUBVP_MAIN ||
+                               pipe->stream->fpo_in_use)) {
                        if (hubp && hubp->funcs->hubp_update_force_pstate_disallow)
                                hubp->funcs->hubp_update_force_pstate_disallow(hubp, true);
-               }
-
-               if (pipe->stream && pipe->stream->fpo_in_use) {
-                       if (hubp && hubp->funcs->hubp_update_force_pstate_disallow)
-                               hubp->funcs->hubp_update_force_pstate_disallow(hubp, true);
-                       /* For now only force cursor p-state disallow for FPO
-                        * Needs to be added for subvp once FW side gets updated
-                        */
                        if (hubp && hubp->funcs->hubp_update_force_cursor_pstate_disallow)
                                hubp->funcs->hubp_update_force_cursor_pstate_disallow(hubp, true);
                }