Skip to contentSkip to conversation

[2.2 & 2.4] fbgen & multiple RGBA, take 3 (no more MIME)

PATCH New Romain Dolbeau 1 participant 1 message Jun 28, 2001 1 message not in the archive Framebuffer layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 [2.2 & 2.4] fbgen & multiple RGBA, take 3 (no more MIME)

Quoted 1 line · James Simmons

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:

Quoted 5 lines

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).

#####

drivers/video/fbgen.c renamed from drivers/video/fbgen.c.ORIG +0 -0
@@ -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)
#####

Signature · 3 lines
DOLBEAU Romain               | l'histoire est entierement vraie, puisque
ENS Cachan / Ker Lann        |     je l'ai imaginee d'un bout a l'autre
[email protected]             |           -- Boris Vian