[parisc-linux-cvs] linux-2.6 deller

Helge Deller deller at gmx.de
Fri Oct 29 17:02:28 MDT 2004


On Saturday 30 October 2004 00:59, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux-2.6
> Changes by:	deller at cvs.parisc-linux.org	2004-10-29 16:59:50
> 
> Modified files:
> 	.              : Makefile 
> 	drivers/video  : stifb.c 
> 
> Log message:
> 	2.6.10-rc1-pa3: this fixes the STI crash with HCRX-24 in 32bpp mode,
> 	Thanks to Johannes Raspe <j.raspe at t-online.de> for testing!
> 
> Patches:
> http://cvs.parisc-linux.org/linux-2.6/Makefile.diff?cvsroot=&r1=1.284&r2=1.285
> http://cvs.parisc-linux.org/linux-2.6/drivers/video/stifb.c.diff?cvsroot=&r1=1.10&r2=1.11

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/Makefile,v
retrieving revision 1.284
diff -u -p -r1.284 Makefile
--- Makefile	29 Oct 2004 13:10:30 -0000	1.284
+++ Makefile	29 Oct 2004 22:56:06 -0000
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 10
-EXTRAVERSION =-rc1-pa2
+EXTRAVERSION =-rc1-pa3
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
Index: drivers/video/stifb.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/video/stifb.c,v
retrieving revision 1.10
diff -u -p -r1.10 stifb.c
--- drivers/video/stifb.c	30 Sep 2004 12:08:24 -0000	1.10
+++ drivers/video/stifb.c	29 Oct 2004 22:56:08 -0000
@@ -112,6 +112,7 @@ struct stifb_info {
 	ngle_rom_t ngle_rom;
 	struct sti_struct *sti;
 	int deviceSpecificConfig;
+	u32 pseudo_palette[16];
 };
 
 static int __initdata bpp = 8;	/* parameter from modprobe */
@@ -1030,6 +1031,14 @@ stifb_setcolreg(u_int regno, u_int red, 
 				/* 0x100 is same as used in WRITE_IMAGE_COLOR() */
 		START_COLORMAPLOAD(fb, lutBltCtl.all);
 		SETUP_FB(fb);
+
+		/* info->var.bits_per_pixel == 32 */
+		if (regno < 16) 
+		  ((u32 *)(info->pseudo_palette))[regno] =
+			(red   << info->var.red.offset)   |
+			(green << info->var.green.offset) |
+			(blue  << info->var.blue.offset);
+
 	} else {
 		/* cleanup colormap hardware */
 		FINISH_IMAGE_COLORMAP_ACCESS(fb);
@@ -1327,6 +1336,7 @@ stifb_init_fb(struct sti_struct *sti, in
 	info->screen_base = (void*) REGION_BASE(fb,1);
 	info->flags = FBINFO_DEFAULT;
 	info->currcon = -1;
+	info->pseudo_palette = &fb->pseudo_palette;
 
 	/* This has to been done !!! */
 	fb_alloc_cmap(&info->cmap, 256, 0);


More information about the parisc-linux-cvs mailing list