summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2010-09-22 14:37:29 +0530
committerRicardo Perez Olivares <x0081762@ti.com>2010-09-27 17:10:25 -0500
commit0d9a3645fbe222a48a939214c71da2bc59093f2a (patch)
treeb0354407507863cf46091405902a5f1731ebbf0d /drivers/media
parentf6eb68d571d256999d9fd0f26b085a74ca29f2ab (diff)
OMAP: V4L2/DSS2: Use 4 byte TILER container for YUYV buffers
A 4 byte TILER container is used instead of 2 byte container to preserve the YUYV pixel content after rotation. Some artifacts are still seen on 90 and 270 rotation and are being worked upon. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/omap/omap_vout.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index 4ad6ecded4da..8ac5b2f000fe 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -305,7 +305,7 @@ int omap_vout_try_format(struct v4l2_pix_format *pix)
case V4L2_PIX_FMT_UYVY:
default:
pix->colorspace = V4L2_COLORSPACE_JPEG;
- bpp = YUYV_BPP;
+ bpp = 4;
break;
case V4L2_PIX_FMT_RGB565:
case V4L2_PIX_FMT_RGB565X:
@@ -552,6 +552,7 @@ static int omap_vout_tiler_buffer_setup(struct omap_vout_device *vout,
{
int i, aligned = 1;
enum tiler_fmt fmt;
+ int width;
/* normalize buffers to allocate so we stay within bounds */
int start = (startindex < 0) ? 0 : startindex;
@@ -578,8 +579,13 @@ static int omap_vout_tiler_buffer_setup(struct omap_vout_device *vout,
bpp == 4 ? TILFMT_32BIT : TILFMT_INVALID);
if (fmt == TILFMT_INVALID)
return -ENOMEM;
+ if ((OMAP_DSS_COLOR_YUV2 == video_mode_to_dss_mode(pix))
+ || (OMAP_DSS_COLOR_UYVY == video_mode_to_dss_mode(pix)))
+ width = pix->width >> 1;
+ else
+ width = pix->width;
- tiler_alloc_packed(&n_alloc, fmt, pix->width,
+ tiler_alloc_packed(&n_alloc, fmt, width,
pix->height,
(void **) vout->buf_phy_addr + start,
(void **) vout->buf_phy_addr_alloced + start,