diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-18 11:09:04 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-07-19 06:15:24 -0400 |
commit | 15dede882e564601947f2ce4b647742c0351be6d (patch) | |
tree | 97690ec93993eec421c818496ffaec17df9fd5f6 /drivers/video/sh_mobile_lcdcfb.c | |
parent | bd5f2c6911c210af52fa4dc4cf504043ff8a4971 (diff) |
fbdev: sh_mobile_lcdc: Support horizontal panning
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | 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 68011b5596c..d82c1dedc46 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 = { | |||
1493 | .type = FB_TYPE_PACKED_PIXELS, | 1493 | .type = FB_TYPE_PACKED_PIXELS, |
1494 | .visual = FB_VISUAL_TRUECOLOR, | 1494 | .visual = FB_VISUAL_TRUECOLOR, |
1495 | .accel = FB_ACCEL_NONE, | 1495 | .accel = FB_ACCEL_NONE, |
1496 | .xpanstep = 0, | 1496 | .xpanstep = 1, |
1497 | .ypanstep = 1, | 1497 | .ypanstep = 1, |
1498 | .ywrapstep = 0, | 1498 | .ywrapstep = 0, |
1499 | .capabilities = FB_CAP_FOURCC, | 1499 | .capabilities = FB_CAP_FOURCC, |
@@ -1714,9 +1714,14 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl) | |||
1714 | else | 1714 | else |
1715 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 1715 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
1716 | 1716 | ||
1717 | if (ovl->format->fourcc == V4L2_PIX_FMT_NV12 || | 1717 | switch (ovl->format->fourcc) { |
1718 | ovl->format->fourcc == V4L2_PIX_FMT_NV21) | 1718 | case V4L2_PIX_FMT_NV16: |
1719 | case V4L2_PIX_FMT_NV61: | ||
1719 | info->fix.ypanstep = 2; | 1720 | info->fix.ypanstep = 2; |
1721 | case V4L2_PIX_FMT_NV12: | ||
1722 | case V4L2_PIX_FMT_NV21: | ||
1723 | info->fix.xpanstep = 2; | ||
1724 | } | ||
1720 | 1725 | ||
1721 | /* Initialize variable screen information. */ | 1726 | /* Initialize variable screen information. */ |
1722 | var = &info->var; | 1727 | var = &info->var; |
@@ -1771,7 +1776,7 @@ static const struct fb_fix_screeninfo sh_mobile_lcdc_fix = { | |||
1771 | .type = FB_TYPE_PACKED_PIXELS, | 1776 | .type = FB_TYPE_PACKED_PIXELS, |
1772 | .visual = FB_VISUAL_TRUECOLOR, | 1777 | .visual = FB_VISUAL_TRUECOLOR, |
1773 | .accel = FB_ACCEL_NONE, | 1778 | .accel = FB_ACCEL_NONE, |
1774 | .xpanstep = 0, | 1779 | .xpanstep = 1, |
1775 | .ypanstep = 1, | 1780 | .ypanstep = 1, |
1776 | .ywrapstep = 0, | 1781 | .ywrapstep = 0, |
1777 | .capabilities = FB_CAP_FOURCC, | 1782 | .capabilities = FB_CAP_FOURCC, |
@@ -2209,9 +2214,14 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch, | |||
2209 | else | 2214 | else |
2210 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 2215 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
2211 | 2216 | ||
2212 | if (ch->format->fourcc == V4L2_PIX_FMT_NV12 || | 2217 | switch (ch->format->fourcc) { |
2213 | ch->format->fourcc == V4L2_PIX_FMT_NV21) | 2218 | case V4L2_PIX_FMT_NV16: |
2219 | case V4L2_PIX_FMT_NV61: | ||
2214 | info->fix.ypanstep = 2; | 2220 | info->fix.ypanstep = 2; |
2221 | case V4L2_PIX_FMT_NV12: | ||
2222 | case V4L2_PIX_FMT_NV21: | ||
2223 | info->fix.xpanstep = 2; | ||
2224 | } | ||
2215 | 2225 | ||
2216 | /* Initialize variable screen information using the first mode as | 2226 | /* Initialize variable screen information using the first mode as |
2217 | * default. | 2227 | * default. |