Attached is a patch to uncorrupt the mouse pointer on PowerPC based laptops 
with Radeon M9 chipsets.  I'm not sure if there are other chipsets that need 
this or not as this is the only one I have, but it fixes things for me.


-- 

George Staikos
? Makefile
? r128.4.html
? r128._man
Index: radeon_cursor.c
===================================================================
RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_cursor.c,v
retrieving revision 1.17
diff -u -3 -p -r1.17 radeon_cursor.c
--- radeon_cursor.c	2002/10/31 05:49:58	1.17
+++ radeon_cursor.c	2002/11/21 17:08:26
@@ -229,39 +229,49 @@ static void RADEONLoadCursorImage(ScrnIn
     info->cursor_argb = FALSE;
 #endif
 #if X_BYTE_ORDER == X_BIG_ENDIAN
-    switch(info->CurrentLayout.pixel_bytes) {
-    case 4:
-    case 3:
-	for (y = 0; y < 64; y++) {
-	    P_SWAP32(d,s);
-	    d++; s++;
-	    P_SWAP32(d,s);
-	    d++; s++;
-	    P_SWAP32(d,s);
-	    d++; s++;
-	    P_SWAP32(d,s);
-	    d++; s++;
-	}
-	break;
-    case 2:
-	for (y = 0; y < 64; y++) {
-	    P_SWAP16(d,s);
-	    d++; s++;
-	    P_SWAP16(d,s);
-	    d++; s++;
-	    P_SWAP16(d,s);
-	    d++; s++;
-	    P_SWAP16(d,s);
-	    d++; s++;
-	}
-	break;
-    default:
-	for (y = 0; y < 64; y++) {
-	    *d++ = *s++;
-	    *d++ = *s++;
-	    *d++ = *s++;
-	    *d++ = *s++;
-	}
+    /* Some cards don't need an endian swap it seems. */
+    if (info->ChipFamily == CHIP_FAMILY_M9) {
+            for (y = 0; y < 64; y++) {
+                *d++ = *s++;
+                *d++ = *s++;
+                *d++ = *s++;
+                *d++ = *s++;
+            }
+    } else {
+        switch(info->CurrentLayout.pixel_bytes) {
+        case 4:
+        case 3:
+            for (y = 0; y < 64; y++) {
+                P_SWAP32(d,s);
+                d++; s++;
+                P_SWAP32(d,s);
+                d++; s++;
+                P_SWAP32(d,s);
+                d++; s++;
+                P_SWAP32(d,s);
+                d++; s++;
+            }
+            break;
+        case 2:
+            for (y = 0; y < 64; y++) {
+                P_SWAP16(d,s);
+                d++; s++;
+                P_SWAP16(d,s);
+                d++; s++;
+                P_SWAP16(d,s);
+                d++; s++;
+                P_SWAP16(d,s);
+                d++; s++;
+            }
+            break;
+        default:
+            for (y = 0; y < 64; y++) {
+                *d++ = *s++;
+                *d++ = *s++;
+                *d++ = *s++;
+                *d++ = *s++;
+            }
+        }
     }
 #else
     for (y = 0; y < 64; y++) {

Reply via email to