Skip to content

Commit 49d0555

Browse files
melissawenalexdeucher
authored andcommitted
drm/amd/display: fix cursor offset on rotation 180
Cursor gets clipped off in the middle of the screen with hw rotation 180. Fix a miscalculation of cursor offset when it's placed near the edges in the pipe split case. Cursor bugs with hw rotation were reported on AMD issue tracker: https://gitlab.freedesktop.org/drm/amd/-/issues/2247 The issues on rotation 270 was fixed by: https://lore.kernel.org/amd-gfx/[email protected]/ that partially addressed the rotation 180 too. So, this patch is the final bits for rotation 180. Reported-by: Xaver Hugl <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Fixes: 9d84c7e ("drm/amd/display: Correct cursor position on horizontal mirror") Signed-off-by: Melissa Wen <[email protected]> Signed-off-by: Hamza Mahfooz <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 5630a35 commit 49d0555

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3626,7 +3626,7 @@ void dcn10_set_cursor_position(struct pipe_ctx *pipe_ctx)
36263626
(int)hubp->curs_attr.width || pos_cpy.x
36273627
<= (int)hubp->curs_attr.width +
36283628
pipe_ctx->plane_state->src_rect.x) {
3629-
pos_cpy.x = temp_x + viewport_width;
3629+
pos_cpy.x = 2 * viewport_width - temp_x;
36303630
}
36313631
}
36323632
} else {

0 commit comments

Comments
 (0)