[PATCH] fbdev: Use logo with depth of 4 or less for static pseudocolor
authorAntonino A. Daplas <adaplas@gmail.com>
Tue, 11 Apr 2006 05:55:49 +0000 (22:55 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:54 +0000 (06:18 -0700)
Since the visual STATIC_PSEUDOCOLOR has a read-only colormap, use logos
with 16 colors only since these logos use the console palette.  This has a
higher likelihood that the logo will display correctly.

Signed-of-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/fbmem.c

index 944855b3e4afe304aab2f25c43d24c6b5dbe82bf..8d8eadb648530add752890c8a38a6b6bcd74d62b 100644 (file)
@@ -435,6 +435,11 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
                        depth = info->var.green.length;
        }
 
+       if (info->fix.visual == FB_VISUAL_STATIC_PSEUDOCOLOR) {
+               /* assume console colormap */
+               depth = 4;
+       }
+
        if (depth >= 8) {
                switch (info->fix.visual) {
                case FB_VISUAL_TRUECOLOR: