diff mbox

fbdev: sh_mobile_lcdc: Fix vertical panning step

Message ID 1343306215-20868-1-git-send-email-laurent.pinchart@ideasonboard.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laurent Pinchart July 26, 2012, 12:36 p.m. UTC
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>
---
 drivers/video/sh_mobile_lcdcfb.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Comments

Kuninori Morimoto July 30, 2012, 1:25 a.m. UTC | #1
Hi Laurent

> diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
> index 8cb653b..699487c 100644
> --- a/drivers/video/sh_mobile_lcdcfb.c
> +++ b/drivers/video/sh_mobile_lcdcfb.c
> @@ -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;
>  	}

If possible, could you please add comment /* fall through */ ?
current code is a little bit confusing

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Aug. 6, 2012, 3:26 p.m. UTC | #2
Hi Morimoto-san,

On Sunday 29 July 2012 18:25:59 Kuninori Morimoto wrote:
> > diff --git a/drivers/video/sh_mobile_lcdcfb.c
> > b/drivers/video/sh_mobile_lcdcfb.c index 8cb653b..699487c 100644
> > --- a/drivers/video/sh_mobile_lcdcfb.c
> > +++ b/drivers/video/sh_mobile_lcdcfb.c
> > @@ -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;
> >  	}
> 
> If possible, could you please add comment /* fall through */ ?
> current code is a little bit confusing

I'm afraid the code has already been pushed to v3.6-rc1 :-S
Kuninori Morimoto Aug. 7, 2012, 1:27 a.m. UTC | #3
Dear Laurent

> > If possible, could you please add comment /* fall through */ ?
> > current code is a little bit confusing
> 
> I'm afraid the code has already been pushed to v3.6-rc1 :-S

OK. no worry :)

Best regards
--
Kuninori Morimoto
 
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 8cb653b..699487c 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -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;
 	}