xf86-video-ati: Branch 'atombios-support'

Alex Deucher agd5f at kemper.freedesktop.org
Wed Nov 28 21:47:09 PST 2007


 src/radeon.h        |    6 ------
 src/radeon_cursor.c |   13 ++++---------
 src/radeon_reg.h    |    1 +
 3 files changed, 5 insertions(+), 15 deletions(-)

New commits:
commit 9963b0fe01feb6dd0cb555b874a48f6fa3b255cb
Author: Alex Deucher <alex at samba.(none)>
Date:   Thu Nov 29 00:46:23 2007 -0500

    RADEON: fix cursor offset on avivo chips

diff --git a/src/radeon.h b/src/radeon.h
index ab6c0b3..ed99be7 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -945,12 +945,6 @@ typedef struct {
     unsigned long FbFreeStart, FbFreeSize;
     unsigned char*      BIOSCopy;
 
-    int cursor_width;
-    int cursor_height;
-    int cursor_format;
-    int cursor_x;
-    int cursor_y;
-
     Rotation rotation;
     void (*PointerMoved)(int, int, int);
     CreateScreenResourcesProcPtr CreateScreenResources;
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index a2cec55..282ffd8 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -102,7 +102,7 @@ avivo_setup_cursor(xf86CrtcPtr crtc, Bool enable)
 	OUTREG(AVIVO_D1CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset,
 	       info->fbLocation + info->cursor_offset);
 	OUTREG(AVIVO_D1CUR_SIZE + radeon_crtc->crtc_offset,
-	       ((info->cursor_width -1) << 16) | (info->cursor_height-1));
+	       ((CURSOR_WIDTH - 1) << 16) | (CURSOR_HEIGHT - 1));
 	OUTREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset,
 	       AVIVO_D1CURSOR_EN | (AVIVO_D1CURSOR_MODE_24BPP << AVIVO_D1CURSOR_MODE_SHIFT));
     }
@@ -192,17 +192,12 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 	y *= 2;
 
     if (IS_AVIVO_VARIANT) {
-	if (x < 0)
-	    x = 0;
-	if (y < 0)
-	    y = 0;
-
 	/* avivo cursor spans the full fb width */
 	x += crtc->x;
 	y += crtc->y;
-	OUTREG(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset, (x << 16) | y);
-	radeon_crtc->cursor_x = x;
-	radeon_crtc->cursor_y = y;
+	OUTREG(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
+	       | (yorigin ? 0 : y));
+	OUTREG(AVIVO_D1CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin);
     } else {
 	if (crtc_id == 0) {
 	    OUTREG(RADEON_CUR_HORZ_VERT_OFF,  (RADEON_CUR_LOCK
diff --git a/src/radeon_reg.h b/src/radeon_reg.h
index d3c4e52..1860fa4 100644
--- a/src/radeon_reg.h
+++ b/src/radeon_reg.h
@@ -3400,6 +3400,7 @@
 #define AVIVO_D1CUR_SURFACE_ADDRESS             0x6408
 #define AVIVO_D1CUR_SIZE                        0x6410
 #define AVIVO_D1CUR_POSITION                    0x6414
+#define AVIVO_D1CUR_HOT_SPOT                    0x6418
 
 #define AVIVO_D1MODE_VIEWPORT_START             0x6580
 #define AVIVO_D1MODE_VIEWPORT_SIZE              0x6584


More information about the xorg-commit mailing list