xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Thu Oct 14 14:05:44 PDT 2010


 src/radeon_cursor.c |   29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

New commits:
commit 042037e485396981cf4a420c247104ba5d016ca0
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Thu Oct 14 17:00:51 2010 -0400

    evergreen: requires same cursor fix as avivo chips

diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 9fa2d80..6c2b9e8 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -260,29 +260,14 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
     int xorigin = 0, yorigin = 0;
     int stride = 256;
     DisplayModePtr mode = &crtc->mode;
+    int w = CURSOR_WIDTH;
 
     if (x < 0)                        xorigin = -x+1;
     if (y < 0)                        yorigin = -y+1;
     if (xorigin >= CURSOR_WIDTH)  xorigin = CURSOR_WIDTH - 1;
     if (yorigin >= CURSOR_HEIGHT) yorigin = CURSOR_HEIGHT - 1;
 
-    if (IS_DCE4_VARIANT) {
-	/* avivo cursor spans the full fb width */
-	if (crtc->rotatedData == NULL) {
-	    x += crtc->x;
-	    y += crtc->y;
-	}
-
-	evergreen_lock_cursor(crtc, TRUE);
-	OUTREG(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
-	       | (yorigin ? 0 : y));
-	OUTREG(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin);
-	OUTREG(EVERGREEN_CUR_SIZE + radeon_crtc->crtc_offset,
-	       ((CURSOR_WIDTH - 1) << 16) | (CURSOR_HEIGHT - 1));
-	evergreen_lock_cursor(crtc, FALSE);
-    } else if (IS_AVIVO_VARIANT) {
-	int w = CURSOR_WIDTH;
-
+    if (IS_AVIVO_VARIANT) {
 	/* avivo cursor spans the full fb width */
 	if (crtc->rotatedData == NULL) {
 	    x += crtc->x;
@@ -307,7 +292,17 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 	    if (w <= 0)
 		w = 1;
 	}
+    }
 
+    if (IS_DCE4_VARIANT) {
+	evergreen_lock_cursor(crtc, TRUE);
+	OUTREG(EVERGREEN_CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
+	       | (yorigin ? 0 : y));
+	OUTREG(EVERGREEN_CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin);
+	OUTREG(EVERGREEN_CUR_SIZE + radeon_crtc->crtc_offset,
+	       ((w - 1) << 16) | (CURSOR_HEIGHT - 1));
+	evergreen_lock_cursor(crtc, FALSE);
+    } else if (IS_AVIVO_VARIANT) {
 	avivo_lock_cursor(crtc, TRUE);
 	OUTREG(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
 	       | (yorigin ? 0 : y));


More information about the xorg-commit mailing list