RE: [PATCH] media: imx-mipi-csis: add support for MEDIA_BUS_FMT_YUYV8_1X16
From: G.N. Zhou (OSS)
Date: Wed Oct 14 2026 - 23:37:03 EST
Hi Laurent,
Thanks for your review.
NXP Confidential
> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> Sent: Thursday, October 15, 2026 5:56 AM
> To: G.N. Zhou (OSS) <guoniu.zhou@xxxxxxxxxxx>
> Cc: Frank Li <frank.li@xxxxxxx>; Martin Kepplinger-Novakovic
> <martink@xxxxxxxxx>; Rui Miguel Silva <rmfrfs@xxxxxxxxx>; Purism Kernel
> Team <kernel@xxxxxxx>; Bryan O'Donoghue <bod@xxxxxxxxxx>; Mauro
> Carvalho Chehab <mchehab@xxxxxxxxxx>; Sascha Hauer
> <s.hauer@xxxxxxxxxxxxxx>; Pengutronix Kernel Team
> <kernel@xxxxxxxxxxxxxx>; Fabio Estevam <festevam@xxxxxxxxx>;
> imx@xxxxxxxxxxxxxxx; linux-media@xxxxxxxxxxxxxxx; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Alice Yuan
> <alice.yuan@xxxxxxx>
> Subject: Re: [PATCH] media: imx-mipi-csis: add support for
> MEDIA_BUS_FMT_YUYV8_1X16
>
> Hello Guoniu,
>
> Thank you for the patch.
>
> On Fri, Oct 09, 2026 at 06:58:41PM +0800, guoniu.zhou@xxxxxxxxxxx wrote:
> > From: Alice Yuan <alice.yuan@xxxxxxx>
> >
> > Add MEDIA_BUS_FMT_YUYV8_1X16 to the list of supported bus formats.
> >
> > The format uses the same CSI-2 YUV422 8-bit data type and 16-bit
> > parallel bus width as MEDIA_BUS_FMT_UYVY8_1X16, but with a different
> > component ordering. Supporting YUYV allows sensors and bridge devices
> > that output YUYV formatted YUV422 data to be used with the i.MX MIPI
> > CSIS driver without requiring format conversion.
>
> What sensor(s) do you have in mind ? CSI-2 does not support other component
> orderings, the YUV4222_8B data type specifies the ordering on the bus as [U1,
> Y1, V1, Y2], and V4L2 maps that to MEDIA_BUS_FMT_UYVY8_1X16.
The sensor is the OV5640. Its driver already advertises MEDIA_BUS_FMT_YUYV8_1X16
for CSI-2 mode in mainline (ov5640.c, ov5640_csi2_formats[]). According to datasheet,
ov5640 ISP reorders YUV components via register 0x4300 before transmitting over the
CSI-2 link using the YUV422_8B data type. The CSIS itself is a pass-through — it does not
interpret or reorder pixel data, it just forwards whatever the sensor sends. Without
YUYV8_1X16 in the CSIS format table, media link validation fails when using the OV5640
in YUYV mode.
Best Regards
G.N Zhou
>
> > Signed-off-by: Alice Yuan <alice.yuan@xxxxxxx>
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@xxxxxxxxxxx>
> > ---
> > drivers/media/platform/nxp/imx-mipi-csis.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c
> > b/drivers/media/platform/nxp/imx-mipi-csis.c
> > index 5f9691d76434..14a00b9fcedf 100644
> > --- a/drivers/media/platform/nxp/imx-mipi-csis.c
> > +++ b/drivers/media/platform/nxp/imx-mipi-csis.c
> > @@ -382,6 +382,11 @@ static const struct csis_pix_format
> mipi_csis_formats[] = {
> > .output = MEDIA_BUS_FMT_UYVY8_1X16,
> > .data_type = MIPI_CSI2_DT_YUV422_8B,
> > .width = 16,
> > + }, {
> > + .code = MEDIA_BUS_FMT_YUYV8_1X16,
> > + .output = MEDIA_BUS_FMT_YUYV8_1X16,
> > + .data_type = MIPI_CSI2_DT_YUV422_8B,
> > + .width = 16,
> > },
> > /* RGB formats. */
> > {
> >
> > ---
> > base-commit: b38d06ad1e13c32970d58039c154f009b81a3368
> > change-id: 20261009-csis_sam-c5c10ed12322
>
> --
> Regards,
>
> Laurent Pinchart