diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4916-drm-amd-display-add-additional-info-for-cursor-posit.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/4916-drm-amd-display-add-additional-info-for-cursor-posit.patch | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4916-drm-amd-display-add-additional-info-for-cursor-posit.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4916-drm-amd-display-add-additional-info-for-cursor-posit.patch new file mode 100644 index 00000000..ca25bd92 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4916-drm-amd-display-add-additional-info-for-cursor-posit.patch @@ -0,0 +1,113 @@ +From 2eac1bbf7dc93fa0b1ae2ec58fe3135ead4a02ba Mon Sep 17 00:00:00 2001 +From: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> +Date: Tue, 19 Jun 2018 15:49:02 -0400 +Subject: [PATCH 4916/5725] drm/amd/display: add additional info for cursor + position programming + +Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> +Reviewed-by: Charlene Liu <Charlene.Liu@amd.com> +Acked-by: Harry Wentland <harry.wentland@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 5 +++-- + drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 7 ++++--- + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c | 4 ++-- + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c | 4 ++-- + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 7 ++++--- + 5 files changed, 15 insertions(+), 12 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h +index 7117f9f..afda2d4 100644 +--- a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h ++++ b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h +@@ -404,9 +404,10 @@ struct dc_cursor_position { + struct dc_cursor_mi_param { + unsigned int pixel_clk_khz; + unsigned int ref_clk_khz; +- unsigned int viewport_x_start; +- unsigned int viewport_width; ++ struct rect viewport; + struct fixed31_32 h_scale_ratio; ++ struct fixed31_32 v_scale_ratio; ++ enum dc_rotation_angle rotation; + }; + + /* IPP related types */ +diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +index 1634e9d..b0bcc9a 100644 +--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c ++++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +@@ -2782,9 +2782,10 @@ void dce110_set_cursor_position(struct pipe_ctx *pipe_ctx) + struct dc_cursor_mi_param param = { + .pixel_clk_khz = pipe_ctx->stream->timing.pix_clk_khz, + .ref_clk_khz = pipe_ctx->stream->ctx->dc->res_pool->ref_clock_inKhz, +- .viewport_x_start = pipe_ctx->plane_res.scl_data.viewport.x, +- .viewport_width = pipe_ctx->plane_res.scl_data.viewport.width, +- .h_scale_ratio = pipe_ctx->plane_res.scl_data.ratios.horz ++ .viewport = pipe_ctx->plane_res.scl_data.viewport, ++ .h_scale_ratio = pipe_ctx->plane_res.scl_data.ratios.horz, ++ .v_scale_ratio = pipe_ctx->plane_res.scl_data.ratios.vert, ++ .rotation = pipe_ctx->plane_state->rotation + }; + + if (pipe_ctx->plane_state->address.type +diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +index 742fd49..a558efa 100644 +--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c ++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +@@ -445,10 +445,10 @@ void dpp1_set_cursor_position( + uint32_t width) + { + struct dcn10_dpp *dpp = TO_DCN10_DPP(dpp_base); +- int src_x_offset = pos->x - pos->x_hotspot - param->viewport_x_start; ++ int src_x_offset = pos->x - pos->x_hotspot - param->viewport.x; + uint32_t cur_en = pos->enable ? 1 : 0; + +- if (src_x_offset >= (int)param->viewport_width) ++ if (src_x_offset >= (int)param->viewport.width) + cur_en = 0; /* not visible beyond right edge*/ + + if (src_x_offset + (int)width <= 0) +diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +index 9eb60a0..617fd30 100644 +--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c ++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c +@@ -1083,7 +1083,7 @@ void hubp1_cursor_set_position( + const struct dc_cursor_mi_param *param) + { + struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp); +- int src_x_offset = pos->x - pos->x_hotspot - param->viewport_x_start; ++ int src_x_offset = pos->x - pos->x_hotspot - param->viewport.x; + uint32_t cur_en = pos->enable ? 1 : 0; + uint32_t dst_x_offset = (src_x_offset >= 0) ? src_x_offset : 0; + +@@ -1107,7 +1107,7 @@ void hubp1_cursor_set_position( + dc_fixpt_from_int(dst_x_offset), + param->h_scale_ratio)); + +- if (src_x_offset >= (int)param->viewport_width) ++ if (src_x_offset >= (int)param->viewport.width) + cur_en = 0; /* not visible beyond right edge*/ + + if (src_x_offset + (int)hubp->curs_attr.width <= 0) +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 12cb828..80cb7fd 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 +@@ -2543,9 +2543,10 @@ static void dcn10_set_cursor_position(struct pipe_ctx *pipe_ctx) + struct dc_cursor_mi_param param = { + .pixel_clk_khz = pipe_ctx->stream->timing.pix_clk_khz, + .ref_clk_khz = pipe_ctx->stream->ctx->dc->res_pool->ref_clock_inKhz, +- .viewport_x_start = pipe_ctx->plane_res.scl_data.viewport.x, +- .viewport_width = pipe_ctx->plane_res.scl_data.viewport.width, +- .h_scale_ratio = pipe_ctx->plane_res.scl_data.ratios.horz ++ .viewport = pipe_ctx->plane_res.scl_data.viewport, ++ .h_scale_ratio = pipe_ctx->plane_res.scl_data.ratios.horz, ++ .v_scale_ratio = pipe_ctx->plane_res.scl_data.ratios.vert, ++ .rotation = pipe_ctx->plane_state->rotation + }; + + if (pipe_ctx->plane_state->address.type +-- +2.7.4 + |