drm/amd/display: program manual trigger only for bottom most pipe
authorAric Cyr <aric.cyr@amd.com>
Thu, 16 May 2019 22:43:54 +0000 (18:43 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 31 May 2019 15:39:33 +0000 (10:39 -0500)
[Why]
We only want to manual trigger end-of-frame when the bottom-most
pipe is flipped to prevent overlays from ending the frame too early.

[How]
Check that the manual trigger is only firing on bottom plane.

Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 49be32863044df3896b63ab48735361ab6e4bb9f..d89a29bd878592af16eb3c35c1d659c49257e7d9 100644 (file)
@@ -1781,14 +1781,14 @@ static void commit_planes_for_stream(struct dc *dc,
                dc->hwss.pipe_control_lock(dc, top_pipe_to_program, false);
        }
 
-       // Fire manual trigger
-       for (i = 0; i < dc->res_pool->pipe_count; i++) {
-               struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
+       // Fire manual trigger only when bottom plane is flipped
+       for (j = 0; j < dc->res_pool->pipe_count; j++) {
+               struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[j];
 
-               if (pipe_ctx->top_pipe ||
-                       !pipe_ctx->stream ||
-                       pipe_ctx->stream != stream ||
-                       !srf_updates[i].flip_addr)
+               if (pipe_ctx->bottom_pipe ||
+                               !pipe_ctx->stream ||
+                               pipe_ctx->stream != stream ||
+                               !pipe_ctx->plane_state->update_flags.bits.addr_update)
                        continue;
 
                if (pipe_ctx->stream_res.tg->funcs->program_manual_trigger)