diff options
author | Mukund Mittal <mmittal@ti.com> | 2010-10-21 12:13:26 +0530 |
---|---|---|
committer | Samreen <samreen@ti.com> | 2010-10-29 16:02:53 +0530 |
commit | d76e6dad46c26cb003ebbe1543b8c592c349a5c3 (patch) | |
tree | 262ed4bb74580d32fe11545efdc3676d50423f07 /drivers/media | |
parent | 64f191e05ab7faa5c7f5b6cfb4f097d832fbcacf (diff) |
OMAP: V4L2/WB: Use 4 byte TILER container for YUYV
A 4 byte TILER container is used instead of 2 byte container in WB to keep it in sync with the other pipelines
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mukund Mittal <mmittal@ti.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/omap/omap_wb.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/video/omap/omap_wb.c b/drivers/media/video/omap/omap_wb.c index ca7480de0de1..03f19bf82c39 100644 --- a/drivers/media/video/omap/omap_wb.c +++ b/drivers/media/video/omap/omap_wb.c @@ -606,6 +606,16 @@ static int omap_wb_tiler_buffer_setup(struct omap_wb_device *wb, (void **) wb->buf_phy_uv_addr_alloced + start, aligned); } else { + unsigned int width = pix->width; + switch (video_mode_to_dss_mode(pix)) { + case OMAP_DSS_COLOR_UYVY: + case OMAP_DSS_COLOR_YUV2: + width /= 2; + bpp = 4; + break; + default: + break; + } /* Only bpp of 1, 2, and 4 is supported by tiler */ fmt = (bpp == 1 ? TILFMT_8BIT : bpp == 2 ? TILFMT_16BIT : @@ -613,7 +623,7 @@ static int omap_wb_tiler_buffer_setup(struct omap_wb_device *wb, if (fmt == TILFMT_INVALID) return -ENOMEM; - tiler_alloc_packed(&n_alloc, fmt, pix->width, + tiler_alloc_packed(&n_alloc, fmt, width, pix->height, (void **) wb->buf_phy_addr + start, (void **) wb->buf_phy_addr_alloced + start, |