summaryrefslogtreecommitdiff
path: root/drivers/video/bfin-t350mcqb-fb.c
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2009-01-16 00:50:46 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-16 03:39:35 +0300
commitb46578ed094122a6b36002c644711cef68aa9c9e (patch)
treeb59525983804eda1b56ec1f61872bef2e1d36fd6 /drivers/video/bfin-t350mcqb-fb.c
parenta342d215c206d955fea55d778e3803b29ee41b60 (diff)
downloadlinux-b46578ed094122a6b36002c644711cef68aa9c9e.tar.xz
video/framebuffer: fix bug: jpegview cannot work on framebuffer device other than 16BPP
Force fb_var_screeninfo color format on all Blackfin Framebuffer Drivers. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Cc: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/bfin-t350mcqb-fb.c')
-rw-r--r--drivers/video/bfin-t350mcqb-fb.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index a9b3ada05d99..2a423d3a2a8e 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -254,7 +254,20 @@ static int bfin_t350mcqb_fb_check_var(struct fb_var_screeninfo *var,
struct fb_info *info)
{
- if (var->bits_per_pixel != LCD_BPP) {
+ switch (var->bits_per_pixel) {
+ case 24:/* TRUECOLOUR, 16m */
+ var->red.offset = 0;
+ var->green.offset = 8;
+ var->blue.offset = 16;
+ var->red.length = var->green.length = var->blue.length = 8;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+ var->transp.msb_right = 0;
+ var->red.msb_right = 0;
+ var->green.msb_right = 0;
+ var->blue.msb_right = 0;
+ break;
+ default:
pr_debug("%s: depth not supported: %u BPP\n", __func__,
var->bits_per_pixel);
return -EINVAL;