Commit 4440e0e1 authored by Haavard Skinnemoen's avatar Haavard Skinnemoen Committed by Linus Torvalds

atmel_lcdfb: use spare bits in 32bpp mode as alpha channel

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: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@rfo.atmel.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7cc90249
...@@ -219,8 +219,11 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var, ...@@ -219,8 +219,11 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
var->blue.offset = 10; var->blue.offset = 10;
var->red.length = var->green.length = var->blue.length = 5; var->red.length = var->green.length = var->blue.length = 5;
break; break;
case 24:
case 32: case 32:
var->transp.offset = 24;
var->transp.length = 8;
/* fall through */
case 24:
var->red.offset = 0; var->red.offset = 0;
var->green.offset = 8; var->green.offset = 8;
var->blue.offset = 16; var->blue.offset = 16;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment