提交 af1ce6b2 编写于 作者: J Jingoo Han 提交者: Paul Mundt

video: s3c-fb: correct transparency checking in 32bpp

32bpp means ARGB 8888 in the driver, therfore the transparency length
and offset should be 8 and 24 respectively. However, the transparency
length and offset were previously 0, which means that the driver supports
RGB 888 without alpha blending when 32bpp is used.

So, the transparency checking in 32bpp is corrected so that the
transparency length and offset are 8 and 24 respectively.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 6aa96811
...@@ -302,6 +302,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, ...@@ -302,6 +302,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
var->blue.length = 5; var->blue.length = 5;
break; break;
case 32:
case 28: case 28:
case 25: case 25:
var->transp.length = var->bits_per_pixel - 24; var->transp.length = var->bits_per_pixel - 24;
...@@ -310,7 +311,6 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, ...@@ -310,7 +311,6 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var,
case 24: case 24:
/* our 24bpp is unpacked, so 32bpp */ /* our 24bpp is unpacked, so 32bpp */
var->bits_per_pixel = 32; var->bits_per_pixel = 32;
case 32:
var->red.offset = 16; var->red.offset = 16;
var->red.length = 8; var->red.length = 8;
var->green.offset = 8; var->green.offset = 8;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册