[PATCH] fixes for aty128fb

STALE8561d

2 messages, 2 authors, 2003-03-24 · open the first message on its own page

[PATCH] fixes for aty128fb

From: Paul Mackerras <hidden>
Date: 2003-03-24 11:44:45

The patch below fixes a couple of problems in the aty128fb driver: an
include wasn't finding its file, and it needs to access the
pseudo_palette as 32-bit quantities.

Paul.

diff -urN linux-2.5/drivers/video/aty/aty128fb.c linuxppc-2.5/drivers/video/aty/aty128fb.c
--- linux-2.5/drivers/video/aty/aty128fb.c	2003-03-23 16:29:31.000000000 +1100
+++ linuxppc-2.5/drivers/video/aty/aty128fb.c	2003-03-23 21:42:33.000000000 +1100
@@ -62,7 +62,7 @@
 #ifdef CONFIG_ALL_PPC
 #include <asm/prom.h>
 #include <asm/pci-bridge.h>
-#include "macmodes.h"
+#include "../macmodes.h"
 #endif
 
 #ifdef CONFIG_ADB_PMU
@@ -1994,23 +1994,21 @@
 
 	if (regno < 16) {
 		int i;
+		u32 *pal = info->pseudo_palette;
+
 		switch (par->crtc.depth) {
 		case 15:
-			((u16 *) (info->pseudo_palette))[regno] =
-			    (regno << 10) | (regno << 5) | regno;
+			pal[regno] = (regno << 10) | (regno << 5) | regno;
 			break;
 		case 16:
-			((u16 *) (info->pseudo_palette))[regno] =
-			    (regno << 11) | (regno << 6) | regno;
+			pal[regno] = (regno << 11) | (regno << 6) | regno;
 			break;
 		case 24:
-			((u32 *) (info->pseudo_palette))[regno] =
-			    (regno << 16) | (regno << 8) | regno;
+			pal[regno] = (regno << 16) | (regno << 8) | regno;
 			break;
 		case 32:
 			i = (regno << 8) | regno;
-			((u32 *) (info->pseudo_palette))[regno] =
-			    (i << 16) | i;
+			pal[regno] = (i << 16) | i;
 			break;
 		}
 	}


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Re: [PATCH] fixes for aty128fb

From: James Simmons <hidden>
Date: 2003-03-24 18:47:18

Applied.




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help