* [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning
@ 2012-07-19 0:39 Laurent Pinchart
2012-07-19 1:40 ` Damian Hobson-Garcia
2012-07-19 10:20 ` Laurent Pinchart
0 siblings, 2 replies; 3+ messages in thread
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 68011b5..aeb7585 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1493,7 +1493,7 @@ static const struct fb_fix_screeninfo sh_mobile_lcdc_overlay_fix = {
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR,
.accel = FB_ACCEL_NONE,
- .xpanstep = 0,
+ .xpanstep = 1,
.ypanstep = 1,
.ywrapstep = 0,
.capabilities = FB_CAP_FOURCC,
@@ -1714,9 +1714,14 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
else
info->fix.visual = FB_VISUAL_TRUECOLOR;
- if (ovl->format->fourcc = V4L2_PIX_FMT_NV12 ||
- ovl->format->fourcc = V4L2_PIX_FMT_NV21)
+ switch (ovl->format->fourcc) {
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
+ info->fix.xpanstep = 2;
+ case V4L2_PIX_FMT_NV12:
+ case V4L2_PIX_FMT_NV21:
info->fix.ypanstep = 2;
+ }
/* Initialize variable screen information. */
var = &info->var;
@@ -1771,7 +1776,7 @@ static const struct fb_fix_screeninfo sh_mobile_lcdc_fix = {
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR,
.accel = FB_ACCEL_NONE,
- .xpanstep = 0,
+ .xpanstep = 1,
.ypanstep = 1,
.ywrapstep = 0,
.capabilities = FB_CAP_FOURCC,
@@ -2209,9 +2214,14 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
else
info->fix.visual = FB_VISUAL_TRUECOLOR;
- if (ch->format->fourcc = V4L2_PIX_FMT_NV12 ||
- ch->format->fourcc = V4L2_PIX_FMT_NV21)
+ switch (ch->format->fourcc) {
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
+ info->fix.xpanstep = 2;
+ case V4L2_PIX_FMT_NV12:
+ case V4L2_PIX_FMT_NV21:
info->fix.ypanstep = 2;
+ }
/* Initialize variable screen information using the first mode as
* default.
--
1.7.8.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning
2012-07-19 0:39 [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning Laurent Pinchart
@ 2012-07-19 1:40 ` Damian Hobson-Garcia
2012-07-19 10:20 ` Laurent Pinchart
1 sibling, 0 replies; 3+ messages in thread
From: Damian Hobson-Garcia @ 2012-07-19 1:40 UTC (permalink / raw)
To: linux-fbdev
Hi Laurent,
On 2012/07/19 9:39, Laurent Pinchart wrote:
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/video/sh_mobile_lcdcfb.c | 22 ++++++++++++++++------
> 1 files changed, 16 insertions(+), 6 deletions(-)
>
> - if (ovl->format->fourcc = V4L2_PIX_FMT_NV12 ||
> - ovl->format->fourcc = V4L2_PIX_FMT_NV21)
> + switch (ovl->format->fourcc) {
> + case V4L2_PIX_FMT_NV16:
> + case V4L2_PIX_FMT_NV61:
> + info->fix.xpanstep = 2;
> + case V4L2_PIX_FMT_NV12:
> + case V4L2_PIX_FMT_NV21:
> info->fix.ypanstep = 2;
> + }
>
> - if (ch->format->fourcc = V4L2_PIX_FMT_NV12 ||
> - ch->format->fourcc = V4L2_PIX_FMT_NV21)
> + switch (ch->format->fourcc) {
> + case V4L2_PIX_FMT_NV16:
> + case V4L2_PIX_FMT_NV61:
> + info->fix.xpanstep = 2;
> + case V4L2_PIX_FMT_NV12:
> + case V4L2_PIX_FMT_NV21:
> info->fix.ypanstep = 2;
> + }
>
I think that the panstep settings are backwards. The pansteps should be
NV16: x = 2, y = 1; NV12: x = 2, y = 2.
Cheers,
--
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning
2012-07-19 0:39 [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning Laurent Pinchart
2012-07-19 1:40 ` Damian Hobson-Garcia
@ 2012-07-19 10:20 ` Laurent Pinchart
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2012-07-19 10:20 UTC (permalink / raw)
To: linux-fbdev
Hi Damian,
Thank you for the review.
On Thursday 19 July 2012 10:40:03 Damian Hobson-Garcia wrote:
> On 2012/07/19 9:39, Laurent Pinchart wrote:
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >
> > drivers/video/sh_mobile_lcdcfb.c | 22 ++++++++++++++++------
> > 1 files changed, 16 insertions(+), 6 deletions(-)
> >
> > - if (ovl->format->fourcc = V4L2_PIX_FMT_NV12 ||
> > - ovl->format->fourcc = V4L2_PIX_FMT_NV21)
> > + switch (ovl->format->fourcc) {
> > + case V4L2_PIX_FMT_NV16:
> > + case V4L2_PIX_FMT_NV61:
> > + info->fix.xpanstep = 2;
> > + case V4L2_PIX_FMT_NV12:
> > + case V4L2_PIX_FMT_NV21:
> > info->fix.ypanstep = 2;
> > + }
> >
> >
> > - if (ch->format->fourcc = V4L2_PIX_FMT_NV12 ||
> > - ch->format->fourcc = V4L2_PIX_FMT_NV21)
> > + switch (ch->format->fourcc) {
> > + case V4L2_PIX_FMT_NV16:
> > + case V4L2_PIX_FMT_NV61:
> > + info->fix.xpanstep = 2;
> > + case V4L2_PIX_FMT_NV12:
> > + case V4L2_PIX_FMT_NV21:
> > info->fix.ypanstep = 2;
> > + }
>
> I think that the panstep settings are backwards. The pansteps should be
> NV16: x = 2, y = 1; NV12: x = 2, y = 2.
Good catch, thanks. I've fixed that.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-19 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 0:39 [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning Laurent Pinchart
2012-07-19 1:40 ` Damian Hobson-Garcia
2012-07-19 10:20 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).