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 v5 4/4] media: nxp: imx8-isi: Add additional 32-bit RGB format support
Date: Tue, 28 Jul 2026 07:13:16 +0000	[thread overview]
Message-ID: <20260728071316.B54C81F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260728-isi-v5-4-1d22ab91602a@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Incorrect M2M input format mapping for V4L2_PIX_FMT_XBGR32 causes Red and Blue channels to be swapped.
--

--- Patch [4]: [PATCH v5 4/4] media: nxp: imx8-isi: Add additional 32-bit RGB format support ---
commit 14f1b0edd57844d1618923f42c7d14b79400e9d8
Author: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
Subject: media: nxp: imx8-isi: Add additional 32-bit RGB format support

This commit adds support for additional 32-bit RGB pixel formats,
including BGRA32, RGBA32, BGRX32, RGBX32, and ARGB2101010. Formats with
an alpha channel are configured to only support capture since the hardware
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
> index 92647ee1e7933..646a7c3d12639 100644
> --- 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[] = {
>  		.color_planes	= 1,
>  		.depth		= { 32 },
>  		.encoding	= MXC_ISI_ENC_RGB,

[ ... ]

> +	}, {
> +		.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,
> +		.isi_out_format	= CHNL_IMG_CTRL_FORMAT_XBGR888,
> +		.mem_planes	= 1,
> +		.color_planes	= 1,
> +		.depth		= { 32 },
> +		.encoding	= MXC_ISI_ENC_RGB,

[Severity: High]
This is a pre-existing issue, but I noticed the newly added
V4L2_PIX_FMT_RGBX32 format maps its isi_in_format to
CHNL_MEM_RD_CTRL_IMG_TYPE_XBGR8. This happens to be the exact same mapping
used for the pre-existing V4L2_PIX_FMT_XBGR32 format.

Since V4L2_PIX_FMT_XBGR32 and V4L2_PIX_FMT_RGBX32 have swapped Red and
Blue byte orders in memory, they shouldn't map to the same hardware input
format.

Does the pre-existing V4L2_PIX_FMT_XBGR32 format in mxc_isi_formats
incorrectly use CHNL_MEM_RD_CTRL_IMG_TYPE_XBGR8 instead of
CHNL_MEM_RD_CTRL_IMG_TYPE_XRGB8? This would cause the Red and Blue channels
to be swapped when a userspace application uses V4L2_PIX_FMT_XBGR32 for the
M2M output queue.

> +	}, {

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260728-isi-v5-0-1d22ab91602a@oss.nxp.com?part=4

  reply	other threads:[~2026-07-28  7:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  6:58 [PATCH v5 0/4] imx8-isi: Format support enhancements Guoniu Zhou
2026-07-28  6:58 ` [PATCH v5 1/4] media: nxp: imx8-isi: Use BIT_ULL() for 64-bit stream masks Guoniu Zhou
2026-07-28  7:10   ` sashiko-bot
2026-07-28 14:08   ` Loic Poulain
2026-07-28 14:54   ` Frank Li
2026-07-28  6:58 ` [PATCH v5 2/4] media: nxp: imx8-isi: Implement per-stream reference counting for multiplexed streams Guoniu Zhou
2026-07-28 14:57   ` Frank Li
2026-07-28  6:58 ` [PATCH v5 3/4] media: nxp: imx8-isi: Add 16-bit raw Bayer format support guoniu.zhou
2026-07-28 14:11   ` Loic Poulain
2026-07-28  6:58 ` [PATCH v5 4/4] media: nxp: imx8-isi: Add additional 32-bit RGB " Guoniu Zhou
2026-07-28  7:13   ` sashiko-bot [this message]
2026-07-28 14:13   ` Loic Poulain

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=20260728071316.B54C81F000E9@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.