lkml.org 
[lkml]   [2003]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] fixes for aty128fb
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;
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.078 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site