diff options
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 | */ |