]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/fbmem.c
drivers/video/uvesafb.c: fix section mismatch warning in param_set_scroll()
[linux-2.6-omap-h63xx.git] / drivers / video / fbmem.c
index 215ac579f901674c1fc242e5d0681d4a0e206985..1194f5e060ea679e56af87260162d2050d0716c3 100644 (file)
@@ -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);