pm2fb: reset transparency settings
authorkrzysztof.h1@wp.pl <krzysztof.h1@wp.pl>
Tue, 8 May 2007 07:39:56 +0000 (00:39 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:33 +0000 (11:15 -0700)
This patch resets transparency settings when depth changes.  Otherwise the 16
and 24-bit modes work incorrectly after switching from 32-bit mode.

Signed-off-by: Krzysztof Helt < krzysztof.h1@wp.pl>
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/pm2fb.c

index 2a8ba6022d3db409555948e44d60497c68ee1698..33f17a96a569219b9d3a52283b9d37257e68c36c 100644 (file)
@@ -645,6 +645,8 @@ static int pm2fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
                return -EINVAL;
        }
 
+       var->transp.offset = 0;
+       var->transp.length = 0;
        switch(var->bits_per_pixel) {
        case 8:
                var->red.length = var->green.length = var->blue.length = 8;