From: Leon Huang <[email protected]>

[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 <[email protected]>
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Acked-by: Alex Hung <[email protected]>
Signed-off-by: Leon Huang <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 916dceecd3de..cb8edb14603a 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -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(
-- 
2.39.1

Reply via email to