mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
drm/radeon/kms: fix cursor image off-by-one error
The mouse cursor hotspot calculation when the cursor is partially off the top or left side of the screen was off by one. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41158 Signed-off-by: Nicholas Miell <nmiell@gmail.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
5ba7ddf816
commit
b356fe0afe
1 changed files with 2 additions and 2 deletions
|
@ -209,9 +209,9 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
|
|||
int w = radeon_crtc->cursor_width;
|
||||
|
||||
if (x < 0)
|
||||
xorigin = -x + 1;
|
||||
xorigin = -x;
|
||||
if (y < 0)
|
||||
yorigin = -y + 1;
|
||||
yorigin = -y;
|
||||
if (xorigin >= CURSOR_WIDTH)
|
||||
xorigin = CURSOR_WIDTH - 1;
|
||||
if (yorigin >= CURSOR_HEIGHT)
|
||||
|
|
Loading…
Reference in a new issue