> I will intergrate your changes into my fbgen 2.
Guess that means it's OK to ask for integration.
I repost it with proper inlining (sorry about that)
Description of the patch:
> the attached patch fix a problem with `fbgen' when changing the
> RGBA components but not the depth ; `fbgen' would not change
> the colormap in this case, where it should.
> This patch is for kernel 2.4.x, but can also
> be applied to kernel 2.2.x (same bug, same fix).
#####
--- linux/drivers/video/fbgen.c.ORIG Thu May 17 14:34:54 2001
+++ linux/drivers/video/fbgen.c Tue Jun 26 10:26:23 2001
@@ -106,6 +106,7 @@
struct fb_info_gen *info2 = (struct fb_info_gen *)info;
int err;
int oldxres, oldyres, oldbpp, oldxres_virtual, oldyres_virtual,
oldyoffset;
+ struct fb_bitfield oldred, oldgreen, oldblue;
if ((err = fbgen_do_set_var(var, con == currcon, info2)))
return err;
@@ -115,12 +116,18 @@
oldxres_virtual = fb_display[con].var.xres_virtual;
oldyres_virtual = fb_display[con].var.yres_virtual;
oldbpp = fb_display[con].var.bits_per_pixel;
+ oldred = fb_display[con].var.red;
+ oldgreen = fb_display[con].var.green;
+ oldblue = fb_display[con].var.blue;
oldyoffset = fb_display[con].var.yoffset;
fb_display[con].var = *var;
if (oldxres != var->xres || oldyres != var->yres ||
oldxres_virtual != var->xres_virtual ||
oldyres_virtual != var->yres_virtual ||
oldbpp != var->bits_per_pixel ||
+ (!(memcmp(&oldred, &(var->red), sizeof(struct fb_bitfield)))) ||
+ (!(memcmp(&oldgreen, &(var->green), sizeof(struct fb_bitfield))))
||
+ (!(memcmp(&oldblue, &(var->blue), sizeof(struct fb_bitfield)))) ||
oldyoffset != var->yoffset) {
fbgen_set_disp(con, info2);
if (info->changevar)
#####
-- DOLBEAU Romain | l'histoire est entierement vraie, puisque ENS Cachan / Ker Lann | je l'ai imaginee d'un bout a l'autre dolbeau@irisa.fr | -- Boris Vian - 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/