V4L/DVB (6090): ivtv-fb: correct transparency bit reporting
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 22 Aug 2007 11:58:47 +0000 (08:58 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:06:43 +0000 (22:06 -0300)
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/ivtv/ivtv-fb.c

index 008076543aca15e63bec04583cd12df033fa5210..7618cd47a35de05e85e15806572f05ea8a6f8f79 100644 (file)
@@ -608,9 +608,6 @@ static int _ivtvfb_check_var(struct fb_var_screeninfo *var, struct ivtv *itv)
                var->blue.length = 8;
        }
        else if (var->bits_per_pixel == 16) {
-               var->transp.offset = 0;
-               var->transp.length = 0;
-
                /* To find out the true mode, check green length */
                switch (var->green.length) {
                        case 4:
@@ -620,6 +617,8 @@ static int _ivtvfb_check_var(struct fb_var_screeninfo *var, struct ivtv *itv)
                                var->green.length = 4;
                                var->blue.offset = 0;
                                var->blue.length = 4;
+                               var->transp.offset = 12;
+                               var->transp.length = 1;
                                break;
                        case 5:
                                var->red.offset = 10;
@@ -628,6 +627,8 @@ static int _ivtvfb_check_var(struct fb_var_screeninfo *var, struct ivtv *itv)
                                var->green.length = 5;
                                var->blue.offset = 0;
                                var->blue.length = 5;
+                               var->transp.offset = 15;
+                               var->transp.length = 1;
                                break;
                        default:
                                var->red.offset = 11;
@@ -636,6 +637,8 @@ static int _ivtvfb_check_var(struct fb_var_screeninfo *var, struct ivtv *itv)
                                var->green.length = 6;
                                var->blue.offset = 0;
                                var->blue.length = 5;
+                               var->transp.offset = 0;
+                               var->transp.length = 0;
                                break;
                }
        }