diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2011-09-30 11:16:52 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-03 13:37:36 -0400 |
commit | b8aee294d89502469f2d80ae6afb93398d8227e0 (patch) | |
tree | 2c16e37e7cfcffb7d429b76cb2390dcd341accd3 /drivers | |
parent | 7d309529b4c1a6281549bf86681cdfb4fbed49ed (diff) |
drm/radeon: Update AVIVO cursor coordinate origin before x/yorigin calculation.
Fixes cursor disappearing prematurely when moving off a top/left edge which
is not located at the desktop top/left edge.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: stable@kernel.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cursor.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c index bac8ee7990a7..f1d871db0399 100644 --- a/drivers/gpu/drm/radeon/radeon_cursor.c +++ b/drivers/gpu/drm/radeon/radeon_cursor.c | |||
@@ -208,6 +208,13 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, | |||
208 | int xorigin = 0, yorigin = 0; | 208 | int xorigin = 0, yorigin = 0; |
209 | int w = radeon_crtc->cursor_width; | 209 | int w = radeon_crtc->cursor_width; |
210 | 210 | ||
211 | if (ASIC_IS_AVIVO(rdev)) { | ||
212 | /* avivo cursor are offset into the total surface */ | ||
213 | x += crtc->x; | ||
214 | y += crtc->y; | ||
215 | } | ||
216 | DRM_DEBUG("x %d y %d c->x %d c->y %d\n", x, y, crtc->x, crtc->y); | ||
217 | |||
211 | if (x < 0) | 218 | if (x < 0) |
212 | xorigin = min(-x, CURSOR_WIDTH - 1); | 219 | xorigin = min(-x, CURSOR_WIDTH - 1); |
213 | if (y < 0) | 220 | if (y < 0) |
@@ -217,11 +224,6 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, | |||
217 | int i = 0; | 224 | int i = 0; |
218 | struct drm_crtc *crtc_p; | 225 | struct drm_crtc *crtc_p; |
219 | 226 | ||
220 | /* avivo cursor are offset into the total surface */ | ||
221 | x += crtc->x; | ||
222 | y += crtc->y; | ||
223 | DRM_DEBUG("x %d y %d c->x %d c->y %d\n", x, y, crtc->x, crtc->y); | ||
224 | |||
225 | /* avivo cursor image can't end on 128 pixel boundary or | 227 | /* avivo cursor image can't end on 128 pixel boundary or |
226 | * go past the end of the frame if both crtcs are enabled | 228 | * go past the end of the frame if both crtcs are enabled |
227 | */ | 229 | */ |