diff options
author | Sridevi Arvindekar <sarvinde@amd.com> | 2024-06-05 14:44:24 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-06-19 12:44:16 -0400 |
commit | 319d4615518c696bdc33c75f894744ce1be89dd5 (patch) | |
tree | ce0eb4b287979b7379e7dd512375495b2e7b2d79 | |
parent | 0fd146067d1b1aa9e531c8e69357f1be46f1a17a (diff) |
drm/amd/display: mirror case cleanup for cursors
Mirror case unsupported for cursors. So, remove code for mirror case
with cursors.
Reviewed-by: Nevenko Stupar <nevenko.stupar@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Sridevi Arvindekar <sarvinde@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c index e7d6d987e3d3..ef0a42f2933d 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c @@ -1209,34 +1209,7 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx) if (pos_cpy.enable && dcn401_can_pipe_disable_cursor(pipe_ctx)) pos_cpy.enable = false; - if (param.rotation == ROTATION_ANGLE_0) { - int recout_width = - pipe_ctx->plane_res.scl_data.recout.width; - int recout_x = - pipe_ctx->plane_res.scl_data.recout.x; - - if (param.mirror) { - if (pipe_split_on || odm_combine_on) { - if (pos_cpy.x >= recout_width + recout_x) { - pos_cpy.x = 2 * recout_width - - pos_cpy.x + 2 * recout_x; - } else { - uint32_t temp_x = pos_cpy.x; - - pos_cpy.x = 2 * recout_x - pos_cpy.x; - if (temp_x >= recout_x + - (int)hubp->curs_attr.width || pos_cpy.x - <= (int)hubp->curs_attr.width + - pipe_ctx->plane_state->src_rect.x) { - pos_cpy.x = 2 * recout_width - temp_x; - } - } - } else { - pos_cpy.x = recout_width - pos_cpy.x + 2 * recout_x; - } - } - } else if (param.rotation == ROTATION_ANGLE_90) { - } else if (param.rotation == ROTATION_ANGLE_270) { + if (param.rotation == ROTATION_ANGLE_270) { // Swap axis and mirror vertically uint32_t temp_x = pos_cpy.x; @@ -1285,7 +1258,6 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx) pos_cpy.x = pipe_ctx->plane_res.scl_data.recout.width + next_odm_width + next_odm_offset - pos_cpy.y; pos_cpy.y = temp_x; } - } else { } } else if (param.rotation == ROTATION_ANGLE_180) { // Mirror horizontally and vertically |