diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-07-21 07:38:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 20:49:17 -0400 |
commit | 4440e0e11d2e9eb13e6edf44f89019e4f8a4dd58 (patch) | |
tree | 1a65068383672dfb34f04bc5a190d1dbfea64eac /drivers/video/atmel_lcdfb.c | |
parent | 7cc90249ff0e21c526532ce5b5ba35c07c8b8389 (diff) |
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: 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>
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 69ec93ce436a..235b618b4117 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -219,8 +219,11 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var, | |||
219 | var->blue.offset = 10; | 219 | var->blue.offset = 10; |
220 | var->red.length = var->green.length = var->blue.length = 5; | 220 | var->red.length = var->green.length = var->blue.length = 5; |
221 | break; | 221 | break; |
222 | case 24: | ||
223 | case 32: | 222 | case 32: |
223 | var->transp.offset = 24; | ||
224 | var->transp.length = 8; | ||
225 | /* fall through */ | ||
226 | case 24: | ||
224 | var->red.offset = 0; | 227 | var->red.offset = 0; |
225 | var->green.offset = 8; | 228 | var->green.offset = 8; |
226 | var->blue.offset = 16; | 229 | var->blue.offset = 16; |