All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Guoniu Zhou" <guoniu.zhou@oss.nxp.com>
Cc: imx@lists.linux.dev, Frank.Li@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH v4 3/3] media: nxp: imx8-isi: Add additional 32-bit RGB format support
Date: Fri, 24 Jul 2026 08:03:42 +0000	[thread overview]
Message-ID: <20260724080342.998CE1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260724-isi-v4-3-27df7b5f6060@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] V4L2_PIX_FMT_RGBX32 and V4L2_PIX_FMT_XBGR32 share the same isi_in_format, which will result in swapped color channels during M2M reads.
--

--- Patch [3]: [PATCH v4 3/3] media: nxp: imx8-isi: Add additional 32-bit RGB format support ---
commit 60dac66057b0040d017034c0952f79ec30cec366
Author: Guoniu Zhou <guoniu.zhou@oss.nxp.com>

media: nxp: imx8-isi: Add additional 32-bit RGB format support

This commit adds support for additional 32-bit RGB pixel formats (BGRA32,
RGBA32, BGRX32, RGBX32, ARGB2101010) to the i.MX8 ISI driver. Formats with
an alpha channel only support capture, as the ISI ignores alpha bits when
reading from memory.

> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> @@ -166,6 +166,57 @@ static const struct mxc_isi_format_info mxc_isi_formats[] = {

[ ... ]

> +	}, {
> +		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
> +		.fourcc		= V4L2_PIX_FMT_RGBX32,
> +		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
> +				| MXC_ISI_VIDEO_M2M_CAP,
> +		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_XBGR8,

[Severity: High]
Does this mapping for V4L2_PIX_FMT_RGBX32 swap the red and blue channels
during M2M reads?

The newly added V4L2_PIX_FMT_RGBX32 format (memory layout R,G,B,X) maps to
CHNL_MEM_RD_CTRL_IMG_TYPE_XBGR8 for DMA reads.

However, earlier in mxc_isi_formats[], the pre-existing V4L2_PIX_FMT_XBGR32
format (memory layout B,G,R,X) uses this exact same configuration:

	{
		.mbus_code	= MEDIA_BUS_FMT_RGB888_1X24,
		.fourcc		= V4L2_PIX_FMT_XBGR32,
		.type		= MXC_ISI_VIDEO_CAP | MXC_ISI_VIDEO_M2M_OUT
				| MXC_ISI_VIDEO_M2M_CAP,
		.isi_in_format	= CHNL_MEM_RD_CTRL_IMG_TYPE_XBGR8,
        ...
	}

Since these two formats have opposite red and blue channel locations in
memory, can the hardware DMA controller correctly interpret both layouts
using the identical input format configuration? 

It looks like this could result in corrupted color conversions for one of 
these formats during M2M operations.

> +		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_XBGR888,
> +		.mem_planes	= 1,
> +		.color_planes	= 1,
> +		.depth		= { 32 },
> +		.encoding	= MXC_ISI_ENC_RGB,

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260724-isi-v4-0-27df7b5f6060@oss.nxp.com?part=3

  reply	other threads:[~2026-07-24  8:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-24  7:52 [PATCH v4 0/3] imx8-isi: Format support enhancements Guoniu Zhou
2026-07-24  7:52 ` [PATCH v4 1/3] media: nxp: imx8-isi: Implement per-stream reference counting for multiplexed streams Guoniu Zhou
2026-07-24  8:02   ` sashiko-bot
2026-07-24 15:29   ` Frank Li
2026-07-24  7:52 ` [PATCH v4 2/3] media: nxp: imx8-isi: Add 16-bit raw Bayer format support guoniu.zhou
2026-07-24  7:52 ` [PATCH v4 3/3] media: nxp: imx8-isi: Add additional 32-bit RGB " Guoniu Zhou
2026-07-24  8:03   ` sashiko-bot [this message]
2026-07-24 15:30     ` Frank Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260724080342.998CE1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=guoniu.zhou@oss.nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=media-ci@linuxtv.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.