Commit 3bff0796 authored by Martin Tsai's avatar Martin Tsai Committed by Alex Deucher

drm/amd/display: to synchronize the hubp and dpp programming in cursor control

Signed-off-by: default avatarMartin Tsai <Martin.Tsai@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 70ee2def
...@@ -178,6 +178,7 @@ bool dc_stream_set_cursor_attributes( ...@@ -178,6 +178,7 @@ bool dc_stream_set_cursor_attributes(
int i; int i;
struct dc *core_dc; struct dc *core_dc;
struct resource_context *res_ctx; struct resource_context *res_ctx;
struct pipe_ctx *pipe_to_program = NULL;
if (NULL == stream) { if (NULL == stream) {
dm_error("DC: dc_stream is NULL!\n"); dm_error("DC: dc_stream is NULL!\n");
...@@ -205,9 +206,17 @@ bool dc_stream_set_cursor_attributes( ...@@ -205,9 +206,17 @@ bool dc_stream_set_cursor_attributes(
if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state)
continue; continue;
if (!pipe_to_program) {
pipe_to_program = pipe_ctx;
core_dc->hwss.pipe_control_lock(core_dc, pipe_to_program, true);
}
core_dc->hwss.set_cursor_attribute(pipe_ctx); core_dc->hwss.set_cursor_attribute(pipe_ctx);
} }
if (pipe_to_program)
core_dc->hwss.pipe_control_lock(core_dc, pipe_to_program, false);
return true; return true;
} }
...@@ -218,6 +227,7 @@ bool dc_stream_set_cursor_position( ...@@ -218,6 +227,7 @@ bool dc_stream_set_cursor_position(
int i; int i;
struct dc *core_dc; struct dc *core_dc;
struct resource_context *res_ctx; struct resource_context *res_ctx;
struct pipe_ctx *pipe_to_program = NULL;
if (NULL == stream) { if (NULL == stream) {
dm_error("DC: dc_stream is NULL!\n"); dm_error("DC: dc_stream is NULL!\n");
...@@ -243,9 +253,17 @@ bool dc_stream_set_cursor_position( ...@@ -243,9 +253,17 @@ bool dc_stream_set_cursor_position(
!pipe_ctx->plane_res.ipp) !pipe_ctx->plane_res.ipp)
continue; continue;
if (!pipe_to_program) {
pipe_to_program = pipe_ctx;
core_dc->hwss.pipe_control_lock(core_dc, pipe_to_program, true);
}
core_dc->hwss.set_cursor_position(pipe_ctx); core_dc->hwss.set_cursor_position(pipe_ctx);
} }
if (pipe_to_program)
core_dc->hwss.pipe_control_lock(core_dc, pipe_to_program, false);
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment