summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAlberto Aguirre <a-aguirre@ti.com>2010-09-30 16:29:10 -0500
committerRicardo Perez Olivares <x0081762@ti.com>2010-10-04 17:19:58 -0500
commitf02995c46be2958ce6c460f7f3f736078534ea13 (patch)
tree34c87293add76ec25ad31578eea147b1fb49cef4 /drivers/media
parent1b2895c3cbdf2e5ce23fd6fe706904b7f82f3a3d (diff)
OMAP4: V4L2/DSS - Fix wrong configuration for YUV422
Correct configuration for YUV422 formats involves allocating YUV422 format in a 32-bit tiler container with half width. Video pipeline rotation attributes must be configured when using YUV422 formats. Change-Id: I7126440874fb5e9eede600bf287704ecfa5ac481 Signed-off-by: Alberto Aguirre <a-aguirre@ti.com> Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/omap/omap_vout.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index d1dc9adca9f6..74dfab416740 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -552,7 +552,6 @@ 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;
@@ -573,17 +572,22 @@ static int omap_vout_tiler_buffer_setup(struct omap_vout_device *vout,
(void **) vout->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 :
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, width,
pix->height,