X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fvideo%2Ffbmem.c;h=1194f5e060ea679e56af87260162d2050d0716c3;hb=f0f1b3364ae7f48084bdf2837fb979ff59622523;hp=215ac579f901674c1fc242e5d0681d4a0e206985;hpb=b43035a5ec4deecd43019728ab9347df82dd121f;p=linux-2.6-omap-h63xx.git diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 215ac579f90..1194f5e060e 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -244,8 +244,17 @@ static void fb_set_logo(struct fb_info *info, u8 xor = (info->fix.visual == FB_VISUAL_MONO01) ? 0xff : 0; u8 fg = 1, d; - if (fb_get_color_depth(&info->var, &info->fix) == 3) + switch (fb_get_color_depth(&info->var, &info->fix)) { + case 1: + fg = 1; + break; + case 2: + fg = 3; + break; + default: fg = 7; + break; + } if (info->fix.visual == FB_VISUAL_MONO01 || info->fix.visual == FB_VISUAL_MONO10) @@ -564,21 +573,6 @@ int fb_prepare_logo(struct fb_info *info, int rotate) depth = 4; } - if (depth >= 8) { - switch (info->fix.visual) { - case FB_VISUAL_TRUECOLOR: - fb_logo.needs_truepalette = 1; - break; - case FB_VISUAL_DIRECTCOLOR: - fb_logo.needs_directpalette = 1; - fb_logo.needs_cmapreset = 1; - break; - case FB_VISUAL_PSEUDOCOLOR: - fb_logo.needs_cmapreset = 1; - break; - } - } - /* Return if no suitable logo was found */ fb_logo.logo = fb_find_logo(depth); @@ -604,6 +598,22 @@ int fb_prepare_logo(struct fb_info *info, int rotate) else fb_logo.depth = 1; + + if (fb_logo.depth > 4 && depth > 4) { + switch (info->fix.visual) { + case FB_VISUAL_TRUECOLOR: + fb_logo.needs_truepalette = 1; + break; + case FB_VISUAL_DIRECTCOLOR: + fb_logo.needs_directpalette = 1; + fb_logo.needs_cmapreset = 1; + break; + case FB_VISUAL_PSEUDOCOLOR: + fb_logo.needs_cmapreset = 1; + break; + } + } + return fb_prepare_extra_logos(info, fb_logo.logo->height, yres); } @@ -1557,8 +1567,6 @@ int fb_new_modelist(struct fb_info *info) static char *video_options[FB_MAX] __read_mostly; static int ofonly __read_mostly; -extern const char *global_mode_option; - /** * fb_get_options - get kernel boot parameters * @name: framebuffer name as it would appear in @@ -1626,7 +1634,7 @@ static int __init video_setup(char *options) } if (!global && !strstr(options, "fb:")) { - global_mode_option = options; + fb_mode_option = options; global = 1; } @@ -1653,7 +1661,6 @@ EXPORT_SYMBOL(register_framebuffer); EXPORT_SYMBOL(unregister_framebuffer); EXPORT_SYMBOL(num_registered_fb); EXPORT_SYMBOL(registered_fb); -EXPORT_SYMBOL(fb_prepare_logo); EXPORT_SYMBOL(fb_show_logo); EXPORT_SYMBOL(fb_set_var); EXPORT_SYMBOL(fb_blank);