* [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video
@ 2017-05-26 10:55 Sekhar Nori
2017-05-26 21:00 ` Kevin Hilman
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Sekhar Nori @ 2017-05-26 10:55 UTC (permalink / raw)
To: Prabhakar Lad, Mauro Carvalho Chehab, Hans Verkuil
Cc: linux-media, Kevin Hilman, Alejandro Hernandez, Sekhar Nori
For both BT.656 and BT.1120 video, the pixel format
used by VPIF is Y/CbCr 4:2:2 in semi-planar format
(Luma in one plane and Chroma in another). This
corresponds to NV16 pixel format.
This is documented in section 36.2.3 of OMAP-L138
Technical Reference Manual, SPRUH77A.
The VPIF driver incorrectly sets the default format
to V4L2_PIX_FMT_YUV422P. Fix it.
Reported-by: Alejandro Hernandez <ajhernandez@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
drivers/media/platform/davinci/vpif_capture.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index 44f702752d3a..128e92d1dd5a 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -513,7 +513,7 @@ static int vpif_update_std_info(struct channel_obj *ch)
if (ch->vpifparams.iface.if_type == VPIF_IF_RAW_BAYER)
common->fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR8;
else
- common->fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUV422P;
+ common->fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_NV16;
common->fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@@ -917,8 +917,8 @@ static int vpif_enum_fmt_vid_cap(struct file *file, void *priv,
fmt->pixelformat = V4L2_PIX_FMT_SBGGR8;
} else {
fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
- strcpy(fmt->description, "YCbCr4:2:2 YC Planar");
- fmt->pixelformat = V4L2_PIX_FMT_YUV422P;
+ strcpy(fmt->description, "YCbCr4:2:2 Semi-Planar");
+ fmt->pixelformat = V4L2_PIX_FMT_NV16;
}
return 0;
}
@@ -946,8 +946,8 @@ static int vpif_try_fmt_vid_cap(struct file *file, void *priv,
if (pixfmt->pixelformat != V4L2_PIX_FMT_SBGGR8)
pixfmt->pixelformat = V4L2_PIX_FMT_SBGGR8;
} else {
- if (pixfmt->pixelformat != V4L2_PIX_FMT_YUV422P)
- pixfmt->pixelformat = V4L2_PIX_FMT_YUV422P;
+ if (pixfmt->pixelformat != V4L2_PIX_FMT_NV16)
+ pixfmt->pixelformat = V4L2_PIX_FMT_NV16;
}
common->fmt.fmt.pix.pixelformat = pixfmt->pixelformat;
--
2.9.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video
2017-05-26 10:55 [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video Sekhar Nori
@ 2017-05-26 21:00 ` Kevin Hilman
2017-05-30 9:40 ` Lad, Prabhakar
2017-05-30 12:15 ` Benoit Parrot
2 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2017-05-26 21:00 UTC (permalink / raw)
To: Sekhar Nori
Cc: Prabhakar Lad, Mauro Carvalho Chehab, Hans Verkuil, linux-media,
Alejandro Hernandez
Sekhar Nori <nsekhar@ti.com> writes:
> For both BT.656 and BT.1120 video, the pixel format
> used by VPIF is Y/CbCr 4:2:2 in semi-planar format
> (Luma in one plane and Chroma in another). This
> corresponds to NV16 pixel format.
>
> This is documented in section 36.2.3 of OMAP-L138
> Technical Reference Manual, SPRUH77A.
>
> The VPIF driver incorrectly sets the default format
> to V4L2_PIX_FMT_YUV422P. Fix it.
>
> Reported-by: Alejandro Hernandez <ajhernandez@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video
2017-05-26 10:55 [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video Sekhar Nori
2017-05-26 21:00 ` Kevin Hilman
@ 2017-05-30 9:40 ` Lad, Prabhakar
2017-05-30 10:57 ` Sekhar Nori
2017-05-30 12:15 ` Benoit Parrot
2 siblings, 1 reply; 5+ messages in thread
From: Lad, Prabhakar @ 2017-05-30 9:40 UTC (permalink / raw)
To: Sekhar Nori
Cc: Mauro Carvalho Chehab, Hans Verkuil, linux-media, Kevin Hilman,
Alejandro Hernandez
Hi Sekhar,
Thanks for the patch.
On Fri, May 26, 2017 at 11:55 AM, Sekhar Nori <nsekhar@ti.com> wrote:
> For both BT.656 and BT.1120 video, the pixel format
> used by VPIF is Y/CbCr 4:2:2 in semi-planar format
> (Luma in one plane and Chroma in another). This
> corresponds to NV16 pixel format.
>
> This is documented in section 36.2.3 of OMAP-L138
> Technical Reference Manual, SPRUH77A.
>
> The VPIF driver incorrectly sets the default format
> to V4L2_PIX_FMT_YUV422P. Fix it.
>
> Reported-by: Alejandro Hernandez <ajhernandez@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Can you also post a similar patch for vpif_display as well ?
Cheers,
--Prabhakar Lad
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video
2017-05-30 9:40 ` Lad, Prabhakar
@ 2017-05-30 10:57 ` Sekhar Nori
0 siblings, 0 replies; 5+ messages in thread
From: Sekhar Nori @ 2017-05-30 10:57 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: Mauro Carvalho Chehab, Hans Verkuil, linux-media, Kevin Hilman,
Alejandro Hernandez
On Tuesday 30 May 2017 03:10 PM, Lad, Prabhakar wrote:
> Hi Sekhar,
>
> Thanks for the patch.
>
> On Fri, May 26, 2017 at 11:55 AM, Sekhar Nori <nsekhar@ti.com> wrote:
>> For both BT.656 and BT.1120 video, the pixel format
>> used by VPIF is Y/CbCr 4:2:2 in semi-planar format
>> (Luma in one plane and Chroma in another). This
>> corresponds to NV16 pixel format.
>>
>> This is documented in section 36.2.3 of OMAP-L138
>> Technical Reference Manual, SPRUH77A.
>>
>> The VPIF driver incorrectly sets the default format
>> to V4L2_PIX_FMT_YUV422P. Fix it.
>>
>> Reported-by: Alejandro Hernandez <ajhernandez@ti.com>
>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
>
> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Thanks!
>
> Can you also post a similar patch for vpif_display as well ?
Sure. The LCDK board I am working on does not have the VPIF display. But
I should be able to test that on the EVM.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video
2017-05-26 10:55 [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video Sekhar Nori
2017-05-26 21:00 ` Kevin Hilman
2017-05-30 9:40 ` Lad, Prabhakar
@ 2017-05-30 12:15 ` Benoit Parrot
2 siblings, 0 replies; 5+ messages in thread
From: Benoit Parrot @ 2017-05-30 12:15 UTC (permalink / raw)
To: Sekhar Nori
Cc: Prabhakar Lad, Mauro Carvalho Chehab, Hans Verkuil, linux-media,
Kevin Hilman, Alejandro Hernandez
Sekhar Nori <nsekhar@ti.com> wrote on Fri [2017-May-26 16:25:27 +0530]:
> For both BT.656 and BT.1120 video, the pixel format
> used by VPIF is Y/CbCr 4:2:2 in semi-planar format
> (Luma in one plane and Chroma in another). This
> corresponds to NV16 pixel format.
>
> This is documented in section 36.2.3 of OMAP-L138
> Technical Reference Manual, SPRUH77A.
>
> The VPIF driver incorrectly sets the default format
> to V4L2_PIX_FMT_YUV422P. Fix it.
>
> Reported-by: Alejandro Hernandez <ajhernandez@ti.com>
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
> ---
> drivers/media/platform/davinci/vpif_capture.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
Acked-by: Benoit Parrot <bparrot@ti.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-30 12:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-26 10:55 [PATCH] davinci: vpif_capture: fix default pixel format for BT.656/BT.1120 video Sekhar Nori
2017-05-26 21:00 ` Kevin Hilman
2017-05-30 9:40 ` Lad, Prabhakar
2017-05-30 10:57 ` Sekhar Nori
2017-05-30 12:15 ` Benoit Parrot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.