Skip to contentSkip to conversation

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

PATCH New Nicolas Ferre 1 participant 1 message Jul 18, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 atmel_lcdfb: Use spare bits in 32bpp mode as alpha channel

From: Haavard Skinnemoen <[email protected]>

Set var->transp.offset and var->transp.length in 32bpp mode to indicate that the 8 otherwise unused bits can be used for transparency.

---
 drivers/video/atmel_lcdfb.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/video/atmel_lcdfb.c +4 -1
index a05491f..bb361ab 100644
@@ -221,8 +221,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;