From: Yongqiang Sun Date: Wed, 18 Oct 2017 15:59:13 +0000 (-0400) Subject: drm/amd/display: Set cursor position as per address. X-Git-Tag: v4.16-rc1~96^2~29^2~250 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7d2638a61ad16aa7145cd3b68ae5757ab988ccab;p=users%2Fhch%2Fblock.git drm/amd/display: Set cursor position as per address. In case of pipe split, cursor position should also be programmed as per cursor address. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index b477a6508db4..40178d8251b8 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c @@ -2414,7 +2414,6 @@ static void program_all_pipe_in_tree( } if (pipe_ctx->plane_state != NULL) { - struct dc_cursor_position position = { 0 }; struct pipe_ctx *cur_pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[pipe_ctx->pipe_idx]; @@ -2434,11 +2433,13 @@ static void program_all_pipe_in_tree( update_dchubp_dpp(dc, pipe_ctx, context); /* TODO: this is a hack w/a for switching from mpo to pipe split */ - dc_stream_set_cursor_position(pipe_ctx->stream, &position); + if (pipe_ctx->stream->cursor_attributes.address.quad_part != 0) { + struct dc_cursor_position position = { 0 }; - if (pipe_ctx->stream->cursor_attributes.address.quad_part != 0) + dc_stream_set_cursor_position(pipe_ctx->stream, &position); dc_stream_set_cursor_attributes(pipe_ctx->stream, &pipe_ctx->stream->cursor_attributes); + } if (cur_pipe_ctx->plane_state != pipe_ctx->plane_state) { dc->hwss.set_input_transfer_func(