public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.2 & 2.4] fbgen & multiple RGBA, take 3 (no more MIME)
       [not found] <Pine.LNX.4.10.10106270922550.30940-100000@transvirtual.com>
@ 2001-06-28  8:49 ` Romain Dolbeau
  0 siblings, 0 replies; only message in thread
From: Romain Dolbeau @ 2001-06-28  8:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: James Simmons, Linux Fbdev development list

James Simmons wrote:

> 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-28  8:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.10.10106270922550.30940-100000@transvirtual.com>
2001-06-28  8:49 ` [PATCH][2.2 & 2.4] fbgen & multiple RGBA, take 3 (no more MIME) Romain Dolbeau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox