fbdev: sh_mobile_lcdc: Fix vertical panning step
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 26 Jul 2012 12:36:55 +0000 (14:36 +0200)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sun, 29 Jul 2012 01:17:07 +0000 (01:17 +0000)
Commit 15dede882e564601947f2ce4b647742c0351be6d added support for
horizontal panning but accidentally computes the Y pan step value
incorrectly for NV12/21 and NV16/61 formats. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/sh_mobile_lcdcfb.c

index 8cb653b..699487c 100644 (file)
@@ -1716,11 +1716,11 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
                info->fix.visual = FB_VISUAL_TRUECOLOR;
 
        switch (ovl->format->fourcc) {
-       case V4L2_PIX_FMT_NV16:
-       case V4L2_PIX_FMT_NV61:
-               info->fix.ypanstep = 2;
        case V4L2_PIX_FMT_NV12:
        case V4L2_PIX_FMT_NV21:
+               info->fix.ypanstep = 2;
+       case V4L2_PIX_FMT_NV16:
+       case V4L2_PIX_FMT_NV61:
                info->fix.xpanstep = 2;
        }
 
@@ -2215,11 +2215,11 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
                info->fix.visual = FB_VISUAL_TRUECOLOR;
 
        switch (ch->format->fourcc) {
-       case V4L2_PIX_FMT_NV16:
-       case V4L2_PIX_FMT_NV61:
-               info->fix.ypanstep = 2;
        case V4L2_PIX_FMT_NV12:
        case V4L2_PIX_FMT_NV21:
+               info->fix.ypanstep = 2;
+       case V4L2_PIX_FMT_NV16:
+       case V4L2_PIX_FMT_NV61:
                info->fix.xpanstep = 2;
        }