Index: stifb.c =================================================================== RCS file: /var/cvs/linux-2.6/drivers/video/stifb.c,v retrieving revision 1.11 diff -u -p -r1.11 stifb.c --- stifb.c 29 Oct 2004 22:59:50 -0000 1.11 +++ stifb.c 31 Oct 2004 12:10:46 -0000 @@ -112,7 +112,7 @@ struct stifb_info { ngle_rom_t ngle_rom; struct sti_struct *sti; int deviceSpecificConfig; - u32 pseudo_palette[16]; + u32 pseudo_palette[256]; }; static int __initdata bpp = 8; /* parameter from modprobe */ @@ -1018,6 +1018,16 @@ stifb_setcolreg(u_int regno, u_int red, (blue)); } + if (info->var.bits_per_pixel == 32) { + ((u32 *)(info->pseudo_palette))[regno] = + (red << info->var.red.offset) | + (green << info->var.green.offset) | + (blue << info->var.blue.offset); + } else { + ((u32 *)(info->pseudo_palette))[regno] = regno; + } + + WRITE_IMAGE_COLOR(fb, regno, color); if (fb->id == S9000_ID_HCRX) { @@ -1031,14 +1041,6 @@ 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);