]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amd/display: add additional info for cursor position programming
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Tue, 19 Jun 2018 19:49:02 +0000 (15:49 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Jul 2018 19:49:23 +0000 (14:49 -0500)
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
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

index 00afd07a852ed363c26fef148a90a9d7f020b452..5e80bc1a88c43b90f88d42e9dd245160b6aa436d 100644 (file)
@@ -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 */
index bf4df34bc1df06d803d6a68f59c6c12029ac95db..5b41cbe06f597c548636c552f118c12b1b7c062c 100644 (file)
@@ -2801,9 +2801,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
index 742fd497ed006c92846a93d35e842511bd7bf8fb..a558efa9b34a45f36982c4344763fb131fa15eef 100644 (file)
@@ -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)
index 9eb60a013f4c16f884c2b9063d377ea3034e5577..617fd30b116132967db2b7a3bbd418b713b3d966 100644 (file)
@@ -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)
index 3b2cb2d3b8a61f6fb2c55bfb427a06d747c2d1f1..2938364fd2f0d4bc85b5e838c1109183bead9114 100644 (file)
@@ -2520,9 +2520,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