[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250630230306.GF15184@pendragon.ideasonboard.com>
Date: Tue, 1 Jul 2025 02:03:06 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Frank Li <Frank.Li@....com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Rui Miguel Silva <rmfrfs@...il.com>,
Martin Kepplinger <martink@...teo.de>,
Purism Kernel Team <kernel@...i.sm>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>, linux-media@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Alice Yuan <alice.yuan@....com>
Subject: Re: [PATCH 1/5] media: nxp: isi: add support for UYVY8_2X8 and
YUYV8_2X8 bus codes
On Mon, Jun 30, 2025 at 06:28:17PM -0400, Frank Li wrote:
> From: Alice Yuan <alice.yuan@....com>
>
> Add support for media bus codes UYVY8_2X8 and YUYV8_2X8 in the ISI pipe.
> These formats are commonly used by sensors like ov5640, which typically
> uses MEDIA_BUS_FMT_YUYV8_2X8.
>
> Signed-off-by: Alice Yuan <alice.yuan@....com>
> Signed-off-by: Frank Li <Frank.Li@....com>
> ---
> drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> index d76eb58deb096..1a4bf1ac02641 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
> @@ -39,6 +39,16 @@ static const struct mxc_isi_bus_format_info mxc_isi_bus_formats[] = {
> .output = MEDIA_BUS_FMT_YUV8_1X24,
> .pads = BIT(MXC_ISI_PIPE_PAD_SINK),
> .encoding = MXC_ISI_ENC_YUV,
> + }, {
> + .mbus_code = MEDIA_BUS_FMT_UYVY8_2X8,
> + .output = MEDIA_BUS_FMT_YUV8_1X24,
> + .pads = BIT(MXC_ISI_PIPE_PAD_SINK),
> + .encoding = MXC_ISI_ENC_YUV,
> + }, {
> + .mbus_code = MEDIA_BUS_FMT_YUYV8_2X8,
> + .output = MEDIA_BUS_FMT_YUV8_1X24,
> + .pads = BIT(MXC_ISI_PIPE_PAD_SINK),
> + .encoding = MXC_ISI_ENC_YUV,
This doesn't seem quite right. The format here corresponds to the pixel
link interface between the ISI and its source. There's no difference in
this patch in in register values between MEDIA_BUS_FMT_UYVY8_2X8 and
MEDIA_BUS_FMT_UYVY8_1X16. I don't think the ISI would be able to
automatically differentiate between receiving UYVY on a 16-bit bus with
one clock per pixel, and receiving it on a 8-bit bus with two clocks per
pixel. I believe you should translate MEDIA_BUS_FMT_UYVY8_2X8 to
MEDIA_BUS_FMT_UYVY8_1X16 in the source subdev driver.
> }, {
> .mbus_code = MEDIA_BUS_FMT_YUV8_1X24,
> .output = MEDIA_BUS_FMT_YUV8_1X24,
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists