From: Alex Deucher Date: Tue, 23 Feb 2010 18:12:43 +0000 (-0500) Subject: drm/radeon/kms/evergreen: fix typo in cursor code X-Git-Tag: v2.6.34-rc1~209^2~10^2~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=22e6dd7e700111c1aa49581d27f2b349cbc798dd;p=karo-tx-linux.git drm/radeon/kms/evergreen: fix typo in cursor code cursor x/y are surface relative. fixes fdo bug 26551 Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c index 9514f3275357..7ecf5e1b39c1 100644 --- a/drivers/gpu/drm/radeon/radeon_cursor.c +++ b/drivers/gpu/drm/radeon/radeon_cursor.c @@ -219,6 +219,11 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc, radeon_lock_cursor(crtc, true); if (ASIC_IS_DCE4(rdev)) { + /* cursors are offset into the total surface */ + x += crtc->x; + y += crtc->y; + DRM_DEBUG("x %d y %d c->x %d c->y %d\n", x, y, crtc->x, crtc->y); + /* XXX: check if evergreen has the same issues as avivo chips */ WREG32(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16) |