Skip to contentSkip to conversation

Compile fixes for various fb drivers

PATCH NAK Sebastian Kügler 2 participants 2 messages Aug 14, 2004 – Aug 15, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Compile fixes for various fb drivers

Hi,

fb_copy_cmap has changed in 2.6.8.1, but the change is not reflected in all drivers, this updates the respective framebuffer drivers.

The patch is against vanilla 2.6.8.1.

kind regards,

Signature · 6 lines
sebas
- - - - - - - - - - -
http://vizZzion.org
======================
mathematician, n.: Some one who believes imaginary things appear right before 
your i's.
drivers/video/atafb.c +1 -1
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/atafb.c linux-2.6.8.1-fb/drivers/video/atafb.c
@@ -2539,7 +2539,7 @@ atafb_get_cmap(struct fb_cmap *cmap, int
 		return fb_get_cmap(cmap, kspc, fbhw->getcolreg, info);
 	else
 		if (fb_display[con].cmap.len) /* non default colormap ? */
-			fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+			fb_copy_cmap(&fb_display[con].cmap, cmap);
 		else
 			fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
 				     cmap, kspc ? 0 : 2);
drivers/video/cyberfb.c +1 -1
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/cyberfb.c linux-2.6.8.1-fb/drivers/video/cyberfb.c
@@ -937,7 +937,7 @@ static int cyberfb_get_cmap(struct fb_cm
 		return(fb_get_cmap(cmap, kspc, Cyber_getcolreg, info));
 	} else if (fb_display[con].cmap.len) { /* non default colormap? */
 		DPRINTK("Use console cmap\n");
-		fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+		fb_copy_cmap(&fb_display[con].cmap, cmap);
 	} else {
 		DPRINTK("Use default cmap\n");
 		fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
drivers/video/retz3fb.c +1 -1
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/retz3fb.c linux-2.6.8.1-fb/drivers/video/retz3fb.c
@@ -1277,7 +1277,7 @@ static int retz3fb_get_cmap(struct fb_cm
 	if (con == info->currcon) /* current console? */
 		return(fb_get_cmap(cmap, kspc, retz3_getcolreg, info));
 	else if (fb_display[con].cmap.len) /* non default colormap? */
-		fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+		fb_copy_cmap(&fb_display[con].cmap, cmap);
 	else
 		fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel),
 			     cmap, kspc ? 0 : 2);
drivers/video/S3triofb.c +1 -1
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/S3triofb.c linux-2.6.8.1-fb/drivers/video/S3triofb.c
@@ -220,7 +220,7 @@ static int s3trio_get_cmap(struct fb_cma
     if (con == info->currcon) /* current console? */
 	return fb_get_cmap(cmap, kspc, s3trio_getcolreg, info);
     else if (fb_display[con].cmap.len) /* non default colormap? */
-	fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+	fb_copy_cmap(&fb_display[con].cmap, cmap);
     else
 	fb_copy_cmap(fb_default_cmap(1 << fb_display[con].var.bits_per_pixel),
 		     cmap, kspc ? 0 : 2);
drivers/video/sis/sis_main.c +3 -3
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/sis/sis_main.c linux-2.6.8.1-fb/drivers/video/sis/sis_main.c
@@ -1641,12 +1641,12 @@ sisfb_get_cmap(struct fb_cmap *cmap, int
 
 	} else if(display->cmap.len) {
 
-		fb_copy_cmap(&display->cmap, cmap, kspc ? 0 : 2);
+		fb_copy_cmap(&display->cmap, cmap);
 
 	} else {
 
 		int size = sisfb_get_cmap_len(&display->var);
-		fb_copy_cmap(fb_default_cmap(size), cmap, kspc ? 0 : 2);
+		fb_copy_cmap(fb_default_cmap(size), cmap);
 
 	}
 
@@ -1671,7 +1671,7 @@ sisfb_set_cmap(struct fb_cmap *cmap, int
 	if(con == ivideo->currcon) {
 		return fb_set_cmap(cmap, kspc, sisfb_setcolreg, info);
 	} else {
-		fb_copy_cmap(cmap, &display->cmap, kspc ? 0 : 1);
+		fb_copy_cmap(cmap, &display->cmap);
 	}
 
 	return 0;
drivers/video/sun3fb.c +1 -1
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/sun3fb.c linux-2.6.8.1-fb/drivers/video/sun3fb.c
@@ -306,7 +306,7 @@ static int sun3fb_get_cmap(struct fb_cma
 	if (con == info->currcon) /* current console? */
 		return fb_get_cmap(cmap, kspc, sun3fb_getcolreg, info);
 	else if (fb_display[con].cmap.len) /* non default colormap? */
-		fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+		fb_copy_cmap(&fb_display[con].cmap, cmap);
 	else
 		fb_copy_cmap(fb_default_cmap(1<<fb_display[con].var.bits_per_pixel), cmap, kspc ? 0 : 2);
 	return 0;
drivers/video/virgefb.c +1 -1
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/virgefb.c linux-2.6.8.1-fb/drivers/video/virgefb.c
@@ -1615,7 +1615,7 @@ static int virgefb_get_cmap(struct fb_cm
 		return(fb_get_cmap(cmap, kspc, fbhw->getcolreg, info));
 	} else if (fb_display[con].cmap.len) { /* non default colormap? */
 		DPRINTK("Use console cmap\n");
-		fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
+		fb_copy_cmap(&fb_display[con].cmap, cmap);
 	} else {
 		DPRINTK("Use default cmap\n");
 		fb_copy_cmap(fb_default_cmap(fb_display[con].var.bits_per_pixel==8 ? 256 : 16),
#1 lore raw
Quoted 8 lines · Sebastian Kügler

Hi,

fb_copy_cmap has changed in 2.6.8.1, but the change is not reflected in all drivers, this updates the respective framebuffer drivers.

The patch is against vanilla 2.6.8.1.

NAK.

First of all, that compile fix isn't - try to compile these drivers and see if any got fixed by that.

While we are at it, if they would compile, you would have broken them.
Question: what do you think the argument in question was controlling and why would "drop it silently" be a correct fix?

And finally, the reason why these drivers would fail to compile for quite a while has a lot in common with the reason why they call fb_copy_cmap() in the first place - they are trying to provide a method that doesn't exist anymore and calls in question are from the instances of that method. Fixing that is going to remove these calls anyway.