[PATCH v2 0/3] media: support Y8/GREY and Y10 bus/pixel formats for Rockchip VICAP and Synopsys CSI2RX

From: Quentin Schulz

Date: Mon Nov 02 2026 - 15:23:55 EST


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@xxxxxxxxx>
---
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@xxxxxxxxx

To: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
To: Mehdi Djait <mehdi.djait@xxxxxxxxxxxxxxx>
To: Michael Riesch <michael.riesch@xxxxxxxxxxxxx>
To: Heiko Stuebner <heiko@xxxxxxxxx>
To: Bryan O'Donoghue <bod@xxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-rockchip@xxxxxxxxxxxxxxxxxxx

---
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@xxxxxxxxx>