drm/amd/display: Wait for VBLANK during pipe programming
authorAlvin Lee <Alvin.Lee2@amd.com>
Mon, 24 Oct 2022 17:39:02 +0000 (13:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Nov 2022 22:24:14 +0000 (17:24 -0500)
[Description]
- Wait for vblank during front end programming
  for global sync to ensure all double buffer
  updates take.
- This prevents underflow in some cases.

Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Acked-by: Alan Liu <HaoPing.Liu@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/dcn20/dcn20_hwseq.c

index f3334f513eb4fee208b252060b883d989e81f41d..b465a83bde6f0981aa8f25d8c72e7a9a24b2570e 100644 (file)
@@ -1663,6 +1663,7 @@ static void dcn20_program_pipe(
                                pipe_ctx->pipe_dlg_param.vupdate_width);
 
                if (pipe_ctx->stream->mall_stream_config.type != SUBVP_PHANTOM) {
+                       pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VBLANK);
                        pipe_ctx->stream_res.tg->funcs->wait_for_state(pipe_ctx->stream_res.tg, CRTC_STATE_VACTIVE);
                }