drm/amd/display: Fix only one ABM pipe enabled under ODM combined case
authorLeon Huang <Leon.Huang1@amd.com>
Tue, 17 Jan 2023 06:17:40 +0000 (14:17 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Jan 2023 19:01:45 +0000 (14:01 -0500)
[Why]
ABM set pipe before updating ODM status,
it leads to incorrect ABM pipe setting when enabling ODM combine.

[How]
Call ABM set pipe flow after ODM status update in program pipe sequence.

Reviewed-by: Chun-Liang Chang <Chun-Liang.Chang@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Leon Huang <Leon.Huang1@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/dcn20/dcn20_hwseq.c

index 916dceecd3de2726ae644ee3f7ff656442e60332..cb8edb14603a3ca3585d9f9303812bbd955717b5 100644 (file)
@@ -1777,6 +1777,15 @@ static void dcn20_program_pipe(
                        &pipe_ctx->stream->bit_depth_params,
                        &pipe_ctx->stream->clamping);
        }
+
+       /* Set ABM pipe after other pipe configurations done */
+       if (pipe_ctx->plane_state->visible) {
+               if (pipe_ctx->stream_res.abm) {
+                       dc->hwss.set_pipe(pipe_ctx);
+                       pipe_ctx->stream_res.abm->funcs->set_abm_level(pipe_ctx->stream_res.abm,
+                               pipe_ctx->stream->abm_level);
+               }
+       }
 }
 
 void dcn20_program_front_end_for_ctx(