[PATCH 1/5] media: nxp: isi: add support for UYVY8_2X8 and YUYV8_2X8 bus codes

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jun 30 16:03:06 PDT 2025


On Mon, Jun 30, 2025 at 06:28:17PM -0400, Frank Li wrote:
> From: Alice Yuan <alice.yuan at nxp.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 at nxp.com>
> Signed-off-by: Frank Li <Frank.Li at nxp.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



More information about the linux-arm-kernel mailing list