]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] v4l: ti-vpe: Fix initial configuration queue data
authorArchit Taneja <archit@ti.com>
Mon, 10 Mar 2014 06:57:40 +0000 (03:57 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 7 Apr 2014 12:43:05 +0000 (09:43 -0300)
The vpe output and capture queues are initially configured to default values in
vpe_open(). A G_FMT before any S_FMTs will result in these values being
populated.

The colorspace and bytesperline parameter of this initial configuration are
incorrect. This breaks compliance when as we get 'TRY_FMT(G_FMT) != G_FMT'.

Fix the initial queue configuration such that it wouldn't need to be fixed by
try_fmt.

Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/ti-vpe/vpe.c

index 4511921421e26e41f09b185d6f573bbda07229d6..dfed704ac375214dc1a8613e96df6c42b4822347 100644 (file)
@@ -1870,9 +1870,11 @@ static int vpe_open(struct file *file)
        s_q_data->fmt = &vpe_formats[2];
        s_q_data->width = 1920;
        s_q_data->height = 1080;
-       s_q_data->sizeimage[VPE_LUMA] = (s_q_data->width * s_q_data->height *
+       s_q_data->bytesperline[VPE_LUMA] = (s_q_data->width *
                        s_q_data->fmt->vpdma_fmt[VPE_LUMA]->depth) >> 3;
-       s_q_data->colorspace = V4L2_COLORSPACE_SMPTE170M;
+       s_q_data->sizeimage[VPE_LUMA] = (s_q_data->bytesperline[VPE_LUMA] *
+                       s_q_data->height);
+       s_q_data->colorspace = V4L2_COLORSPACE_REC709;
        s_q_data->field = V4L2_FIELD_NONE;
        s_q_data->c_rect.left = 0;
        s_q_data->c_rect.top = 0;