diff options
author | Nicholas Miell <nmiell@gmail.com> | 2011-09-29 22:07:14 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-03 13:37:33 -0400 |
commit | b356fe0afe9aa2cfdc7be0bae22ea1c93afc2451 (patch) | |
tree | 8ca64282680148d30fd37c45723e2cc6736fa350 /drivers/gpu | |
parent | 5ba7ddf81634bfdf32d09261d2959e3f5b7c4263 (diff) |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cursor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c index 3189a7efb2e9..c495575b2e1c 100644 --- a/drivers/gpu/drm/radeon/radeon_cursor.c +++ b/drivers/gpu/drm/radeon/radeon_cursor.c | |||
@@ -209,9 +209,9 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, | |||
209 | int w = radeon_crtc->cursor_width; | 209 | int w = radeon_crtc->cursor_width; |
210 | 210 | ||
211 | if (x < 0) | 211 | if (x < 0) |
212 | xorigin = -x + 1; | 212 | xorigin = -x; |
213 | if (y < 0) | 213 | if (y < 0) |
214 | yorigin = -y + 1; | 214 | yorigin = -y; |
215 | if (xorigin >= CURSOR_WIDTH) | 215 | if (xorigin >= CURSOR_WIDTH) |
216 | xorigin = CURSOR_WIDTH - 1; | 216 | xorigin = CURSOR_WIDTH - 1; |
217 | if (yorigin >= CURSOR_HEIGHT) | 217 | if (yorigin >= CURSOR_HEIGHT) |