* [PATCH v2 0/3] media: support Y8/GREY and Y10 bus/pixel formats for Rockchip VICAP and Synopsys CSI2RX
@ 2026-11-02 20:22 Quentin Schulz
2026-11-02 20:22 ` [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info Quentin Schulz
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Quentin Schulz @ 2026-11-02 20:22 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Mehdi Djait, Michael Riesch,
Heiko Stuebner, Bryan O'Donoghue
Cc: linux-media, linux-kernel, linux-arm-kernel, linux-rockchip,
Quentin Schulz
The Media CI robot will complain because the line is too long in patch 1
but it matches all other lines in the same array, so that shouldn't be
an issue. I'll answer the same as on v1, I'm fine doing it if a human
requests it (because I believe the bot request is incorrect).
RK3588 Jaguar can support up to 4 2-lane cameras (two on the main PCBA,
two exposed on the proprietary mezzanine connector). The only camera
module available for this device is based on the OV9281 greyscale camera
sensor.
The OV9282 driver (which also supports the OV9281) allows two formats:
- MEDIA_BUS_FMT_Y8_1X8
- MEDIA_BUS_FMT_Y10_1X10
but they both aren't listed as supported by the RK3588 CSI2RX controller
and RK3588 VICAP drivers.
Add support for those two bus formats to both drivers.
Capturing a frame with yavta[1] for Y10 only works once
struct v4l2_format_info formats also exposes V4L2_PIX_FMT_Y10, so do
that. I couldn't make gstreamer work with Y10, I'm assuming for the same
reasons explained in this issue[2].
All those patches, suggested by Michael Riesch on IRC. Thanks to his
support I now can capture shitty 720p greyscale pictures \o/
I am not entirely sure whether V4L2_PIX_FMT_Y10 is the appropriate
format as we pick MIPI_CSI2_DT_RAW10 as the CSI2 Data Type, which
according to Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst
(very end):
"""
The 'P' variations of the Y10, Y12 and Y14 formats are packed according
to the RAW10, RAW12 and RAW14 packing scheme as defined by the MIPI
CSI-2 specification.
"""
so I would rather expect Y10P. After changing Y10 for Y10P in
drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c and
drivers/media/v4l2-core/v4l2-common.c, and patching yavta to support it,
I also get an image. Other drivers seem to also be associating Y10 (and
not Y10P) with the RAW10 format, so I guess that's fine?
[1] https://git.ideasonboard.com/camera/yavta
[2] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/3738
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Changes in v2:
- rebased on current master to fix trivial conflict,
- Link to v1: https://patch.msgid.link/20261016-v4l-y8-y10-csi-vicap-v1-0-27bb87aa745d@cherry.de
To: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Mehdi Djait <mehdi.djait@linux.intel.com>
To: Michael Riesch <michael.riesch@collabora.com>
To: Heiko Stuebner <heiko@sntech.de>
To: Bryan O'Donoghue <bod@kernel.org>
Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
---
Quentin Schulz (3):
media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info
media: rockchip: rkcif: add support for GREY and Y10 formats
media: synopsys: csi2rx: add support for Y8 and Y10 bus formats
.../platform/rockchip/rkcif/rkcif-capture-mipi.c | 26 ++++++++++++++++++++++
drivers/media/platform/synopsys/dw-mipi-csi2rx.c | 10 +++++++++
drivers/media/v4l2-core/v4l2-common.c | 1 +
3 files changed, 37 insertions(+)
---
base-commit: d89e1d186ec9271bf78e62771779e9fc03bf0fc3
change-id: 20261015-v4l-y8-y10-csi-vicap-bf049dca7988
Best regards,
--
Quentin Schulz <quentin.schulz@cherry.de>
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info 2026-11-02 20:22 [PATCH v2 0/3] media: support Y8/GREY and Y10 bus/pixel formats for Rockchip VICAP and Synopsys CSI2RX Quentin Schulz @ 2026-11-02 20:22 ` Quentin Schulz 2026-11-03 2:30 ` Nicolas Dufresne 2026-11-03 10:59 ` Mehdi Djait 2026-11-02 20:22 ` [PATCH v2 2/3] media: rockchip: rkcif: add support for GREY and Y10 formats Quentin Schulz 2026-11-02 20:22 ` [PATCH v2 3/3] media: synopsys: csi2rx: add support for Y8 and Y10 bus formats Quentin Schulz 2 siblings, 2 replies; 8+ messages in thread From: Quentin Schulz @ 2026-11-02 20:22 UTC (permalink / raw) To: Mauro Carvalho Chehab, Mehdi Djait, Michael Riesch, Heiko Stuebner, Bryan O'Donoghue Cc: linux-media, linux-kernel, linux-arm-kernel, linux-rockchip, Quentin Schulz From: Quentin Schulz <quentin.schulz@cherry.de> Add Y10 format to the v4l2_format_info table. Co-developed-by: Michael Riesch <michael.riesch@collabora.com> Signed-off-by: Michael Riesch <michael.riesch@collabora.com> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> --- drivers/media/v4l2-core/v4l2-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c index 11ab684024c54..8d5020e3d5e2a 100644 --- a/drivers/media/v4l2-core/v4l2-common.c +++ b/drivers/media/v4l2-core/v4l2-common.c @@ -333,6 +333,7 @@ const struct v4l2_format_info *v4l2_format_info(u32 format) { .format = V4L2_PIX_FMT_YVU420, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 }, { .format = V4L2_PIX_FMT_YUV422P, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 1 }, { .format = V4L2_PIX_FMT_GREY, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 1, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 1, .vdiv = 1 }, + { .format = V4L2_PIX_FMT_Y10, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 2, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 1, .vdiv = 1 }, { .format = V4L2_PIX_FMT_Y12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 2, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 1, .vdiv = 1 }, /* Tiled YUV formats */ -- 2.56.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info 2026-11-02 20:22 ` [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info Quentin Schulz @ 2026-11-03 2:30 ` Nicolas Dufresne 2026-11-03 10:59 ` Mehdi Djait 1 sibling, 0 replies; 8+ messages in thread From: Nicolas Dufresne @ 2026-11-03 2:30 UTC (permalink / raw) To: Quentin Schulz, Mauro Carvalho Chehab, Mehdi Djait, Michael Riesch, Heiko Stuebner, Bryan O'Donoghue Cc: linux-media, linux-kernel, linux-arm-kernel, linux-rockchip, Quentin Schulz [-- Attachment #1: Type: text/plain, Size: 434 bytes --] Le lundi 02 novembre 2026 à 21:22 +0100, Quentin Schulz a écrit : > From: Quentin Schulz <quentin.schulz@cherry.de> > > Add Y10 format to the v4l2_format_info table. > > Co-developed-by: Michael Riesch <michael.riesch@collabora.com> > Signed-off-by: Michael Riesch <michael.riesch@collabora.com> > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info 2026-11-02 20:22 ` [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info Quentin Schulz 2026-11-03 2:30 ` Nicolas Dufresne @ 2026-11-03 10:59 ` Mehdi Djait 1 sibling, 0 replies; 8+ messages in thread From: Mehdi Djait @ 2026-11-03 10:59 UTC (permalink / raw) To: Quentin Schulz Cc: Mauro Carvalho Chehab, Michael Riesch, Heiko Stuebner, Bryan O'Donoghue, linux-media, linux-kernel, linux-arm-kernel, linux-rockchip, Quentin Schulz Hello Quentin, Thank you for the patch! On Mon, Nov 02, 2026 at 09:22:42PM +0100, Quentin Schulz wrote: > From: Quentin Schulz <quentin.schulz@cherry.de> > > Add Y10 format to the v4l2_format_info table. > > Co-developed-by: Michael Riesch <michael.riesch@collabora.com> > Signed-off-by: Michael Riesch <michael.riesch@collabora.com> > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com> -- Kind Regards Mehdi Djait ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/3] media: rockchip: rkcif: add support for GREY and Y10 formats 2026-11-02 20:22 [PATCH v2 0/3] media: support Y8/GREY and Y10 bus/pixel formats for Rockchip VICAP and Synopsys CSI2RX Quentin Schulz 2026-11-02 20:22 ` [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info Quentin Schulz @ 2026-11-02 20:22 ` Quentin Schulz 2026-11-03 11:00 ` Mehdi Djait 2026-11-02 20:22 ` [PATCH v2 3/3] media: synopsys: csi2rx: add support for Y8 and Y10 bus formats Quentin Schulz 2 siblings, 1 reply; 8+ messages in thread From: Quentin Schulz @ 2026-11-02 20:22 UTC (permalink / raw) To: Mauro Carvalho Chehab, Mehdi Djait, Michael Riesch, Heiko Stuebner, Bryan O'Donoghue Cc: linux-media, linux-kernel, linux-arm-kernel, linux-rockchip, Quentin Schulz From: Quentin Schulz <quentin.schulz@cherry.de> The OV9282 camera sensor driver can output in those two formats, but the VICAP didn't advertise support for them yet. Suggested-by: Michael Riesch <michael.riesch@collabora.com> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> --- .../platform/rockchip/rkcif/rkcif-capture-mipi.c | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c index 53e62d0597648..4e172366f258c 100644 --- a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c +++ b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c @@ -95,6 +95,26 @@ static const struct rkcif_output_fmt mipi_out_fmts[] = { .type = RKCIF_MIPI_TYPE_RAW8, }, }, + { + .fourcc = V4L2_PIX_FMT_GREY, + .mbus_code = MEDIA_BUS_FMT_Y8_1X8, + .depth = 8, + .cplanes = 1, + .mipi = { + .dt = MIPI_CSI2_DT_RAW8, + .type = RKCIF_MIPI_TYPE_RAW8, + }, + }, + { + .fourcc = V4L2_PIX_FMT_Y10, + .mbus_code = MEDIA_BUS_FMT_Y10_1X10, + .depth = 10, + .cplanes = 1, + .mipi = { + .dt = MIPI_CSI2_DT_RAW10, + .type = RKCIF_MIPI_TYPE_RAW10, + }, + }, /* RGB formats */ { .fourcc = V4L2_PIX_FMT_RGB24, @@ -341,6 +361,12 @@ static const struct rkcif_input_fmt mipi_in_fmts[] = { { .mbus_code = MEDIA_BUS_FMT_VYUY8_1X16, }, + { + .mbus_code = MEDIA_BUS_FMT_Y8_1X8, + }, + { + .mbus_code = MEDIA_BUS_FMT_Y10_1X10, + }, /* RGB formats */ { .mbus_code = MEDIA_BUS_FMT_RGB888_1X24, -- 2.56.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/3] media: rockchip: rkcif: add support for GREY and Y10 formats 2026-11-02 20:22 ` [PATCH v2 2/3] media: rockchip: rkcif: add support for GREY and Y10 formats Quentin Schulz @ 2026-11-03 11:00 ` Mehdi Djait 0 siblings, 0 replies; 8+ messages in thread From: Mehdi Djait @ 2026-11-03 11:00 UTC (permalink / raw) To: Quentin Schulz Cc: Mauro Carvalho Chehab, Michael Riesch, Heiko Stuebner, Bryan O'Donoghue, linux-media, linux-kernel, linux-arm-kernel, linux-rockchip, Quentin Schulz Hello Quentin, Thank you for the patch! On Mon, Nov 02, 2026 at 09:22:43PM +0100, Quentin Schulz wrote: > From: Quentin Schulz <quentin.schulz@cherry.de> > > The OV9282 camera sensor driver can output in those two formats, but the > VICAP didn't advertise support for them yet. > > Suggested-by: Michael Riesch <michael.riesch@collabora.com> > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com> -- Kind Regards Mehdi Djait ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 3/3] media: synopsys: csi2rx: add support for Y8 and Y10 bus formats 2026-11-02 20:22 [PATCH v2 0/3] media: support Y8/GREY and Y10 bus/pixel formats for Rockchip VICAP and Synopsys CSI2RX Quentin Schulz 2026-11-02 20:22 ` [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info Quentin Schulz 2026-11-02 20:22 ` [PATCH v2 2/3] media: rockchip: rkcif: add support for GREY and Y10 formats Quentin Schulz @ 2026-11-02 20:22 ` Quentin Schulz 2026-11-03 11:01 ` Mehdi Djait 2 siblings, 1 reply; 8+ messages in thread From: Quentin Schulz @ 2026-11-02 20:22 UTC (permalink / raw) To: Mauro Carvalho Chehab, Mehdi Djait, Michael Riesch, Heiko Stuebner, Bryan O'Donoghue Cc: linux-media, linux-kernel, linux-arm-kernel, linux-rockchip, Quentin Schulz From: Quentin Schulz <quentin.schulz@cherry.de> The OV9282 camera sensor driver can output in those two formats, but the CSI2 RX controller driver didn't advertise support for them yet. Suggested-by: Michael Riesch <michael.riesch@collabora.com> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> --- drivers/media/platform/synopsys/dw-mipi-csi2rx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c index b7247d597c9cc..9e99947a15252 100644 --- a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c +++ b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c @@ -198,6 +198,16 @@ static const struct dw_mipi_csi2rx_format formats[] = { .depth = 16, .csi_dt = MIPI_CSI2_DT_YUV422_8B, }, + { + .code = MEDIA_BUS_FMT_Y10_1X10, + .depth = 10, + .csi_dt = MIPI_CSI2_DT_RAW10, + }, + { + .code = MEDIA_BUS_FMT_Y8_1X8, + .depth = 8, + .csi_dt = MIPI_CSI2_DT_RAW8, + }, /* RGB formats */ { .code = MEDIA_BUS_FMT_RGB888_1X24, -- 2.56.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 3/3] media: synopsys: csi2rx: add support for Y8 and Y10 bus formats 2026-11-02 20:22 ` [PATCH v2 3/3] media: synopsys: csi2rx: add support for Y8 and Y10 bus formats Quentin Schulz @ 2026-11-03 11:01 ` Mehdi Djait 0 siblings, 0 replies; 8+ messages in thread From: Mehdi Djait @ 2026-11-03 11:01 UTC (permalink / raw) To: Quentin Schulz Cc: Mauro Carvalho Chehab, Michael Riesch, Heiko Stuebner, Bryan O'Donoghue, linux-media, linux-kernel, linux-arm-kernel, linux-rockchip, Quentin Schulz Hello Quentin, Thank you for the patch! On Mon, Nov 02, 2026 at 09:22:44PM +0100, Quentin Schulz wrote: > From: Quentin Schulz <quentin.schulz@cherry.de> > > The OV9282 camera sensor driver can output in those two formats, but the > CSI2 RX controller driver didn't advertise support for them yet. > > Suggested-by: Michael Riesch <michael.riesch@collabora.com> > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com> -- Kind Regards, Mehdi Djait ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-11-03 11:01 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-11-02 20:22 [PATCH v2 0/3] media: support Y8/GREY and Y10 bus/pixel formats for Rockchip VICAP and Synopsys CSI2RX Quentin Schulz 2026-11-02 20:22 ` [PATCH v2 1/3] media: v4l2-common: add V4L2_PIX_FMT_Y10 to v4l2_format_info Quentin Schulz 2026-11-03 2:30 ` Nicolas Dufresne 2026-11-03 10:59 ` Mehdi Djait 2026-11-02 20:22 ` [PATCH v2 2/3] media: rockchip: rkcif: add support for GREY and Y10 formats Quentin Schulz 2026-11-03 11:00 ` Mehdi Djait 2026-11-02 20:22 ` [PATCH v2 3/3] media: synopsys: csi2rx: add support for Y8 and Y10 bus formats Quentin Schulz 2026-11-03 11:01 ` Mehdi Djait
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®