From: sashiko-bot@kernel.org
To: "Rishikesh Donadkar" <r-donadkar@ti.com>
Cc: media-ci@linuxtv.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [RFC PATCH 2/8] media: v4l: Add 10-bit RGBIr formats
Date: Fri, 25 Sep 2026 13:39:55 +0000 [thread overview]
Message-ID: <20260925133956.10E4F1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260925133001.2780868-3-r-donadkar@ti.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] media: UAPI value collision for 10-bit RGBIr formats
- [High] media: missing v4l2_format_info entries for 10-bit RGBIr formats
--
commit 01de78103df3428257eae7c1c28cacb32713e810
Author: Jai Luthra <jai.luthra@linux.dev>
media: v4l: Add 10-bit RGBIr formats
This patch introduces new 10-bit RGBIr formats to support camera sensors
that capture near-IR light along with the visible spectrum. The formats use
an expanded 4x4 CFA pattern to capture both low-light and day-light scenes.
> diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
> index 6005f033e62c0..c50042300a988 100644
> --- a/include/uapi/linux/media-bus-format.h
> +++ b/include/uapi/linux/media-bus-format.h
[ ... ]
> @@ -161,6 +161,14 @@
> #define MEDIA_BUS_FMT_SGBRG20_1X20 0x3022
> #define MEDIA_BUS_FMT_SGRBG20_1X20 0x3023
> #define MEDIA_BUS_FMT_SRGGB20_1X20 0x3024
> +#define MEDIA_BUS_FMT_SRGGI10_1X10 0x3021
> +#define MEDIA_BUS_FMT_SGRIG10_1X10 0x3022
> +#define MEDIA_BUS_FMT_SBGGI10_1X10 0x3023
> +#define MEDIA_BUS_FMT_SGBIG10_1X10 0x3024
[Severity: Critical]
Does this code assign values that directly collide with the 20-bit Bayer
formats defined at 0x3021 through 0x3024?
These exact hex values are already used by the 20-bit Bayer formats
(MEDIA_BUS_FMT_SBGGR20_1X20 through MEDIA_BUS_FMT_SRGGB20_1X20) defined just a
few lines prior. Any userspace program or kernel driver using these UAPI
constants to negotiate formats will encounter unresolvable ambiguity.
Additionally, code attempting to switch on both families will fail to compile
due to duplicate case values.
> +#define MEDIA_BUS_FMT_SGIRG10_1X10 0x3025
> +#define MEDIA_BUS_FMT_SIGGR10_1X10 0x3026
> +#define MEDIA_BUS_FMT_SGIBG10_1X10 0x3027
> +#define MEDIA_BUS_FMT_SIGGB10_1X10 0x3028
>
> /* JPEG compressed formats - next is 0x4002 */
> #define MEDIA_BUS_FMT_JPEG_1X8 0x4001
[ ... ]
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 5373dba640fae..c56af0826f592 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -744,6 +744,15 @@ struct v4l2_pix_format {
> #define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */
> #define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */
> #define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6') /* 16 RGRG.. GBGB.. */
> + /* 10bit raw bayer with IR (4x4) */
> +#define V4L2_PIX_FMT_SRGGI10 v4l2_fourcc('R', 'G', 'I', '0') /* 10 RGBG.. GIrGIr.. */
[Severity: High]
Are these new formats missing from the v4l2_format_info() array in
drivers/media/v4l2-core/v4l2-common.c?
When a standard V4L2 core helper such as v4l2_fill_pixfmt_aligned() or
v4l2_fill_pixfmt_mp_aligned() is used with these new formats,
v4l2_format_info() will return NULL, causing those helpers to immediately
return -EINVAL.
Any driver that natively supports these formats and relies on standard V4L2
helpers to calculate bytes-per-line and size constraints will fail to
negotiate or capture.
> +#define V4L2_PIX_FMT_SGRIG10 v4l2_fourcc('G', 'R', 'I', '0') /* 10 GRGB.. IrGIrG.. */
> +#define V4L2_PIX_FMT_SBGGI10 v4l2_fourcc('B', 'G', 'I', '0') /* 10 BGRG.. GIrGIr.. */
> +#define V4L2_PIX_FMT_SGBIG10 v4l2_fourcc('G', 'B', 'I', '0') /* 10 GBGR.. IrGIrG.. */
> +#define V4L2_PIX_FMT_SGIRG10 v4l2_fourcc('G', 'I', 'R', '0') /* 10 GIrGIr.. RGBG.. */
> +#define V4L2_PIX_FMT_SIGGR10 v4l2_fourcc('I', 'G', 'R', '0') /* 10 IrGIrG.. GRGB.. */
> +#define V4L2_PIX_FMT_SGIBG10 v4l2_fourcc('G', 'I', 'B', '0') /* 10 GIrGIr.. BGRG.. */
> +#define V4L2_PIX_FMT_SIGGB10 v4l2_fourcc('I', 'G', 'B', '0') /* 10 IrGIrG.. GBGR.. */
>
> /* HSV formats */
> #define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3')
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260925133001.2780868-1-r-donadkar@ti.com?part=2
next prev parent reply other threads:[~2026-09-25 13:39 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 13:29 [RFC PATCH 0/8] Add OmniVision OV2312 RGB-IR sensor driver Rishikesh Donadkar
2026-09-25 13:29 ` [RFC PATCH 1/8] dt-bindings: media: Add bindings for Omnivision OV2312 Rishikesh Donadkar
2026-09-25 13:40 ` sashiko-bot
2026-09-26 14:51 ` Laurent Pinchart
2026-09-25 13:29 ` [RFC PATCH 2/8] media: v4l: Add 10-bit RGBIr formats Rishikesh Donadkar
2026-09-25 13:39 ` sashiko-bot [this message]
2026-09-26 14:30 ` Sakari Ailus
2026-09-26 14:40 ` Laurent Pinchart
2026-09-27 5:09 ` Rishikesh Donadkar
2026-09-27 5:08 ` Rishikesh Donadkar
2026-09-27 5:59 ` Sakari Ailus
2026-09-25 13:29 ` [RFC PATCH 3/8] media: i2c: ds90ub960: " Rishikesh Donadkar
2026-09-25 13:41 ` sashiko-bot
2026-09-25 13:29 ` [RFC PATCH 4/8] media: cadence: csi2rx: Add RAW10 " Rishikesh Donadkar
2026-09-26 14:52 ` Laurent Pinchart
2026-09-27 5:20 ` Rishikesh Donadkar
2026-09-27 14:19 ` Laurent Pinchart
2026-09-25 13:29 ` [RFC PATCH 5/8] media: ti: j721e-csi2rx: " Rishikesh Donadkar
2026-09-25 13:29 ` [RFC PATCH 6/8] media: i2c: ov2312: add Omnivison OV2312 driver Rishikesh Donadkar
2026-09-25 13:44 ` sashiko-bot
2026-10-02 16:16 ` Mirela Rabulea
2026-10-03 2:05 ` Jai Luthra
2026-10-05 18:12 ` Mirela Rabulea
2026-10-06 5:19 ` Rishikesh Donadkar
2026-10-06 12:33 ` [EXT] " Mirela Rabulea
2026-10-06 7:36 ` Sakari Ailus
2026-10-06 13:55 ` Mirela Rabulea
2026-10-06 15:37 ` Laurent Pinchart
2026-10-07 7:16 ` Mirela Rabulea
2026-09-25 13:30 ` [RFC PATCH 7/8] arm64: dts: ti: k3-am62a7: FPDLink overlays for LI OV2312 Rishikesh Donadkar
2026-09-25 13:43 ` sashiko-bot
2026-09-26 14:57 ` Laurent Pinchart
2026-09-27 5:23 ` Rishikesh Donadkar
2026-09-25 13:30 ` [RFC PATCH 8/8] arm64: defconfig: Enable OV2312 Rishikesh Donadkar
2026-09-26 14:55 ` Laurent Pinchart
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=20260925133956.10E4F1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=media-ci@linuxtv.org \
--cc=r-donadkar@ti.com \
--cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox