]> err.no Git - linux-2.6/commitdiff
atmel_lcdfb: use spare bits in 32bpp mode as alpha channel
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Sat, 21 Jul 2007 11:38:02 +0000 (04:38 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 22 Jul 2007 00:49:17 +0000 (17:49 -0700)
Set var->transp.offset and var->transp.length in 32bpp mode to indicate
that the 8 otherwise unused bits can be used for transparency.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/atmel_lcdfb.c

index 69ec93ce436a3be1dd879c136d63238b1d99bf26..235b618b41178053670879cb5e9961a164871730 100644 (file)
@@ -219,8 +219,11 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
                var->blue.offset = 10;
                var->red.length = var->green.length = var->blue.length = 5;
                break;
-       case 24:
        case 32:
+               var->transp.offset = 24;
+               var->transp.length = 8;
+               /* fall through */
+       case 24:
                var->red.offset = 0;
                var->green.offset = 8;
                var->blue.offset = 16;