]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
sisfb: fix color component length for pseudocolor modes
authorMichal Januszewski <spock@gentoo.org>
Mon, 13 Apr 2009 21:39:52 +0000 (14:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Apr 2009 22:04:30 +0000 (15:04 -0700)
sisfb incorrectly sets the length of the color fields to 6 bits
for PSEUDOCOLOR modes, even though 8 bits are always used per pixel.
Fix this by setting the length to 8.

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/sis/sis_main.c

index 346d6458cf76a64ef3a96af133e810c2d8c19505..7e17ee95a97aa41b4a990ac395453ad19e10d4da 100644 (file)
@@ -1129,7 +1129,7 @@ sisfb_bpp_to_var(struct sis_video_info *ivideo, struct fb_var_screeninfo *var)
        switch(var->bits_per_pixel) {
        case 8:
                var->red.offset = var->green.offset = var->blue.offset = 0;
-               var->red.length = var->green.length = var->blue.length = 6;
+               var->red.length = var->green.length = var->blue.length = 8;
                break;
        case 16:
                var->red.offset = 11;