mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Compile fixes for various fb drivers
@ 2004-08-14 23:49 Sebastian Kügler
  2004-08-15  7:54 ` viro
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Kügler @ 2004-08-14 23:49 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

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.

Signed-off-by: Sebastian Kügler <sebas@vizZzion.org>

kind regards,
-- 
sebas
- - - - - - - - - - -
http://vizZzion.org
======================
mathematician, n.: Some one who believes imaginary things appear right before 
your i's.


[-- Attachment #2: fb-patch.diff --]
[-- Type: text/x-diff, Size: 5163 bytes --]

diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/atafb.c linux-2.6.8.1-fb/drivers/video/atafb.c
--- linux-2.6.8.1/drivers/video/atafb.c	2004-08-14 12:54:50.000000000 +0200
+++ linux-2.6.8.1-fb/drivers/video/atafb.c	2004-08-15 01:24:33.000000000 +0200
@@ -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);
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/cyberfb.c linux-2.6.8.1-fb/drivers/video/cyberfb.c
--- linux-2.6.8.1/drivers/video/cyberfb.c	2004-08-14 12:54:48.000000000 +0200
+++ linux-2.6.8.1-fb/drivers/video/cyberfb.c	2004-08-15 01:23:52.000000000 +0200
@@ -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),
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/retz3fb.c linux-2.6.8.1-fb/drivers/video/retz3fb.c
--- linux-2.6.8.1/drivers/video/retz3fb.c	2004-08-14 12:56:01.000000000 +0200
+++ linux-2.6.8.1-fb/drivers/video/retz3fb.c	2004-08-15 01:25:15.000000000 +0200
@@ -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);
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/S3triofb.c linux-2.6.8.1-fb/drivers/video/S3triofb.c
--- linux-2.6.8.1/drivers/video/S3triofb.c	2004-08-14 12:56:23.000000000 +0200
+++ linux-2.6.8.1-fb/drivers/video/S3triofb.c	2004-08-15 01:23:11.000000000 +0200
@@ -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);
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
--- linux-2.6.8.1/drivers/video/sis/sis_main.c	2004-08-14 12:55:47.000000000 +0200
+++ linux-2.6.8.1-fb/drivers/video/sis/sis_main.c	2004-08-15 01:20:32.000000000 +0200
@@ -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;
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/sun3fb.c linux-2.6.8.1-fb/drivers/video/sun3fb.c
--- linux-2.6.8.1/drivers/video/sun3fb.c	2004-08-14 12:54:51.000000000 +0200
+++ linux-2.6.8.1-fb/drivers/video/sun3fb.c	2004-08-15 01:24:51.000000000 +0200
@@ -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;
diff -uprN -X dontdiff linux-2.6.8.1/drivers/video/virgefb.c linux-2.6.8.1-fb/drivers/video/virgefb.c
--- linux-2.6.8.1/drivers/video/virgefb.c	2004-08-14 12:55:09.000000000 +0200
+++ linux-2.6.8.1-fb/drivers/video/virgefb.c	2004-08-15 01:22:38.000000000 +0200
@@ -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),

^ permalink raw reply	[flat|nested] 3+ messages in thread
*  Re: [PATCH] Compile fixes for various fb drivers
@ 2004-08-15  8:06 Sebastian Kügler
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Kügler @ 2004-08-15  8:06 UTC (permalink / raw)
  To: linux-kernel

On Sun, Aug 15, 2004 at 09:54, you wrote:
> On Sun, Aug 15, 2004 at 01:49:13AM +0200, Sebastian Kügler wrote:
> > 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.

> 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?

I thought that fb_copy_cmap would figure that out itself now, making the 
respective call in the driver less complicated, since the calls all looked 
the same which was a wrong assumption from my side.

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

Hm, *a little* more complicated than I expected in the first place. I should 
have had a look at how other drivers handle that, the mere fact that the 
driver I am using myself was not in the list should've made me alert.

Anyway, sorry for the noise and thanks for having a look at it.
-- 
sebas
- - - - - - - - - - -
http://vizZzion.org
======================
Honest disagreement is often a good sign of progress. - Mahatma Gandhi 
(1869-1948)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-15 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-14 23:49 [PATCH] Compile fixes for various fb drivers Sebastian Kügler
2004-08-15  7:54 ` viro
2004-08-15  8:06 Sebastian Kügler

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

all inboxes | Powered by JetHome®