diff mbox

[v3,11/14] v4l: ti-vpe: Fix initial configuration queue data

Message ID 1394526833-24805-12-git-send-email-archit@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

archit taneja March 11, 2014, 8:33 a.m. UTC
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.

Signed-off-by: Archit Taneja <archit@ti.com>
---
 drivers/media/platform/ti-vpe/vpe.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Hans Verkuil March 11, 2014, 12:24 p.m. UTC | #1
On 03/11/14 09:33, Archit Taneja wrote:
> 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.
> 
> Signed-off-by: Archit Taneja <archit@ti.com>

Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>

> ---
>  drivers/media/platform/ti-vpe/vpe.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
> index 5591d04..85d1122 100644
> --- a/drivers/media/platform/ti-vpe/vpe.c
> +++ b/drivers/media/platform/ti-vpe/vpe.c
> @@ -2012,9 +2012,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;
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
index 5591d04..85d1122 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -2012,9 +2012,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;