cirrusfb: use 5-6-5 RGB for 16bpp mode
authorKrzysztof Helt <krzysztof.h1@wp.pl>
Tue, 31 Mar 2009 22:25:07 +0000 (15:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Apr 2009 15:59:27 +0000 (08:59 -0700)
Use the 5-6-5 RGB mode instead of the 5-5-5 mode at 16bpp depth.

It fixes colors in the 16bpp modes on Cirrus Laguna chips.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Geert Uytterhoeven <geert.uytterhoeven@gmail.com>
Cc: Arthur Marsh <arthur.marsh@internode.on.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/cirrusfb.c

index 53572c0f3474cb2df1cb169ecd65b30249a225ee..d844c41e20103d188b628ebf42494d064a045451 100644 (file)
@@ -499,12 +499,12 @@ static int cirrusfb_check_var(struct fb_var_screeninfo *var,
                        var->green.offset = -3;
                        var->blue.offset = 8;
                } else {
-                       var->red.offset = 10;
+                       var->red.offset = 11;
                        var->green.offset = 5;
                        var->blue.offset = 0;
                }
                var->red.length = 5;
-               var->green.length = 5;
+               var->green.length = 6;
                var->blue.length = 5;
                break;
 
@@ -1180,7 +1180,7 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
                /* pixel mask: pass-through all planes */
                WGen(cinfo, VGA_PEL_MSK, 0xff);
 #ifdef CONFIG_PCI
-               WHDR(cinfo, 0xc0);      /* Copy Xbh */
+               WHDR(cinfo, 0xc1);      /* Copy Xbh */
 #elif defined(CONFIG_ZORRO)
                /* FIXME: CONFIG_PCI and CONFIG_ZORRO may be defined both */
                WHDR(cinfo, 0xa0);      /* hidden dac reg: nothing special */