Browse Source

[PATCH] fbdev: Static pseudocolor with depth less than 4 does exist

A static pseudocolor visual with depth less than 4 does exist, so let's not
accidentally upscale the depth with this configuration

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Antonino A. Daplas 19 years ago
parent
commit
0c683dbfc0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/video/fbmem.c

+ 1 - 1
drivers/video/fbmem.c

@@ -433,7 +433,7 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
 			depth = info->var.green.length;
 	}
 
-	if (info->fix.visual == FB_VISUAL_STATIC_PSEUDOCOLOR) {
+	if (info->fix.visual == FB_VISUAL_STATIC_PSEUDOCOLOR && depth > 4) {
 		/* assume console colormap */
 		depth = 4;
 	}