Skip to contentSkip to conversation

fb: clean the penguin's dirty feet

PATCH In review Clemens Ladisch 2 participants 2 messages Nov 10, 2008 – Nov 11, 2008 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fb: clean the penguin's dirty feet

When booting in a direct color mode, the penguin has dirty feet, i.e., some pixels have the wrong color. This is caused by fb_set_logo_directpalette() which does not initialize the last 32 palette entries.

drivers/video/fbmem.c +1 -1
@@ -232,7 +232,7 @@ static void fb_set_logo_directpalette(st
 	greenshift = info->var.green.offset;
 	blueshift = info->var.blue.offset;
 
-	for (i = 32; i < logo->clutsize; i++)
+	for (i = 32; i < 32 + logo->clutsize; i++)
 		palette[i] = i << redshift | i << greenshift | i << blueshift;
 }
 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Clemens Ladisch

When booting in a direct color mode, the penguin has dirty feet, i.e., some pixels have the wrong color. This is caused by fb_set_logo_directpalette() which does not initialize the last 32 palette entries.

Nice catch!
It seems to be introduced by commit 0bcb4ab100ef9ac2afaab3e0e929314e43820fc8 ("Supprt for switching hardware from/to vga text mode.", from full-history-linux) back in 2002...

Quoted 1 line

drivers/video/fbmem.c static void fb_set_logo_directpalette(st · line 237

Quoted 10 lines
drivers/video/fbmem.c +1 -1
@@ -232,7 +232,7 @@ static void fb_set_logo_directpalette(st
 	greenshift = info->var.green.offset;
 	blueshift = info->var.blue.offset;
 
-	for (i = 32; i < logo->clutsize; i++)
+	for (i = 32; i < 32 + logo->clutsize; i++)
 		palette[i] = i << redshift | i << greenshift | i << blueshift;
 }

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/