aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbmem.c42
1 files changed, 26 insertions, 16 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 215ac579f901..074027204702 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -244,8 +244,17 @@ static void fb_set_logo(struct fb_info *info,
244 u8 xor = (info->fix.visual == FB_VISUAL_MONO01) ? 0xff : 0; 244 u8 xor = (info->fix.visual == FB_VISUAL_MONO01) ? 0xff : 0;
245 u8 fg = 1, d; 245 u8 fg = 1, d;
246 246
247 if (fb_get_color_depth(&info->var, &info->fix) == 3) 247 switch (fb_get_color_depth(&info->var, &info->fix)) {
248 case 1:
249 fg = 1;
250 break;
251 case 2:
252 fg = 3;
253 break;
254 default:
248 fg = 7; 255 fg = 7;
256 break;
257 }
249 258
250 if (info->fix.visual == FB_VISUAL_MONO01 || 259 if (info->fix.visual == FB_VISUAL_MONO01 ||
251 info->fix.visual == FB_VISUAL_MONO10) 260 info->fix.visual == FB_VISUAL_MONO10)
@@ -564,21 +573,6 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
564 depth = 4; 573 depth = 4;
565 } 574 }
566 575
567 if (depth >= 8) {
568 switch (info->fix.visual) {
569 case FB_VISUAL_TRUECOLOR:
570 fb_logo.needs_truepalette = 1;
571 break;
572 case FB_VISUAL_DIRECTCOLOR:
573 fb_logo.needs_directpalette = 1;
574 fb_logo.needs_cmapreset = 1;
575 break;
576 case FB_VISUAL_PSEUDOCOLOR:
577 fb_logo.needs_cmapreset = 1;
578 break;
579 }
580 }
581
582 /* Return if no suitable logo was found */ 576 /* Return if no suitable logo was found */
583 fb_logo.logo = fb_find_logo(depth); 577 fb_logo.logo = fb_find_logo(depth);
584 578
@@ -604,6 +598,22 @@ int fb_prepare_logo(struct fb_info *info, int rotate)
604 else 598 else
605 fb_logo.depth = 1; 599 fb_logo.depth = 1;
606 600
601
602 if (fb_logo.depth > 4 && depth > 4) {
603 switch (info->fix.visual) {
604 case FB_VISUAL_TRUECOLOR:
605 fb_logo.needs_truepalette = 1;
606 break;
607 case FB_VISUAL_DIRECTCOLOR:
608 fb_logo.needs_directpalette = 1;
609 fb_logo.needs_cmapreset = 1;
610 break;
611 case FB_VISUAL_PSEUDOCOLOR:
612 fb_logo.needs_cmapreset = 1;
613 break;
614 }
615 }
616
607 return fb_prepare_extra_logos(info, fb_logo.logo->height, yres); 617 return fb_prepare_extra_logos(info, fb_logo.logo->height, yres);
608} 618}
609 619