From: Alain Volmat <alain.volmat@foss.st.com>
To: <weidongw@illinois.edu>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
<linux-media@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: stm32: csi: add missing SBGGR 10/12/14 bit formats
Date: Thu, 3 Dec 2026 20:52:44 +0100 [thread overview]
Message-ID: <axHIjG7E8Rnuhtsk@gnbcxd0016.gnb.st.com.gnb.st.com> (raw)
In-Reply-To: <20261202-kbug-l1928-v1-1-29f5428e8cd4@illinois.edu>
Hi,
thanks for this patch.
On Wed, Dec 02, 2026 at 08:24:05PM -0600, Weidong Wang via B4 Relay wrote:
> From: Weidong Wang <weidongw@illinois.edu>
>
> The stm32_csi_formats[] table lists SRGGB10_1X10, SRGGB12_1X12 and
> SRGGB14_1X14 twice each, as both the first and the last entry of the
> 10, 12 and 14 bit Bayer groups, while the SBGGR variants are absent.
> The 8 bit group correctly starts with SBGGR8_1X8.
>
> As a result the SBGGR 10, 12 and 14 bit media bus codes are not
> enumerated, and stm32_csi_set_pad_format() replaces them with the
> default format since they are not found in the table, so a sensor
> producing such formats cannot be used with the CSI.
>
> Replace the first SRGGB entry of each group with the SBGGR one.
>
> Found by a static analysis tool.
>
> The fix and this changelog were drafted with AI assistance (Claude Code,
> with a second review by OpenAI Codex), then reviewed by the submitter.
>
> Fixes: dcb0f4c16be5 ("media: stm32: csi: addition of the STM32 CSI driver")
> Signed-off-by: Weidong Wang <weidongw@illinois.edu>
Reviewed-by: Alain Volmat <alain.volmat@foss.st.com>
Regards,
Alain
> ---
> Testing:
> - Compile-tested on x86_64 (allmodconfig, W=1):
> drivers/media/platform/st/stm32/stm32-csi.o; no new warnings.
> - checkpatch.pl --strict: no errors or warnings.
> ---
> drivers/media/platform/st/stm32/stm32-csi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/st/stm32/stm32-csi.c b/drivers/media/platform/st/stm32/stm32-csi.c
> index e71142634a17..e7e8b9f22a33 100644
> --- a/drivers/media/platform/st/stm32/stm32-csi.c
> +++ b/drivers/media/platform/st/stm32/stm32-csi.c
> @@ -228,17 +228,17 @@ static const struct stm32_csi_fmts stm32_csi_formats[] = {
> FMT_MBUS_DT_DTFMT_BPP(SGRBG8_1X8, RAW8, BPP8, 8),
> FMT_MBUS_DT_DTFMT_BPP(SRGGB8_1X8, RAW8, BPP8, 8),
> /* 10 bit */
> - FMT_MBUS_DT_DTFMT_BPP(SRGGB10_1X10, RAW10, BPP10, 10),
> + FMT_MBUS_DT_DTFMT_BPP(SBGGR10_1X10, RAW10, BPP10, 10),
> FMT_MBUS_DT_DTFMT_BPP(SGBRG10_1X10, RAW10, BPP10, 10),
> FMT_MBUS_DT_DTFMT_BPP(SGRBG10_1X10, RAW10, BPP10, 10),
> FMT_MBUS_DT_DTFMT_BPP(SRGGB10_1X10, RAW10, BPP10, 10),
> /* 12 bit */
> - FMT_MBUS_DT_DTFMT_BPP(SRGGB12_1X12, RAW12, BPP12, 12),
> + FMT_MBUS_DT_DTFMT_BPP(SBGGR12_1X12, RAW12, BPP12, 12),
> FMT_MBUS_DT_DTFMT_BPP(SGBRG12_1X12, RAW12, BPP12, 12),
> FMT_MBUS_DT_DTFMT_BPP(SGRBG12_1X12, RAW12, BPP12, 12),
> FMT_MBUS_DT_DTFMT_BPP(SRGGB12_1X12, RAW12, BPP12, 12),
> /* 14 bit */
> - FMT_MBUS_DT_DTFMT_BPP(SRGGB14_1X14, RAW14, BPP14, 14),
> + FMT_MBUS_DT_DTFMT_BPP(SBGGR14_1X14, RAW14, BPP14, 14),
> FMT_MBUS_DT_DTFMT_BPP(SGBRG14_1X14, RAW14, BPP14, 14),
> FMT_MBUS_DT_DTFMT_BPP(SGRBG14_1X14, RAW14, BPP14, 14),
> FMT_MBUS_DT_DTFMT_BPP(SRGGB14_1X14, RAW14, BPP14, 14),
>
> ---
> base-commit: 37760be5a04b538bbd25099000e37d3208c27efe
> change-id: 20261202-kbug-l1928-03ab5c3db9a5
>
> Best regards,
> --
> Weidong Wang <weidongw@illinois.edu>
>
>
prev parent reply other threads:[~2026-12-03 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 2:24 Weidong Wang via B4 Relay
2026-12-03 19:52 ` Alain Volmat [this message]
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=axHIjG7E8Rnuhtsk@gnbcxd0016.gnb.st.com.gnb.st.com \
--to=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=hverkuil@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mchehab@kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=weidongw@illinois.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®