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

Quentin Schulz foss+kernel at 0leil.net
Fri Oct 16 06:39:56 PDT 2026


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 at cherry.de>
---
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: 0fcb05b72344f40806cbe810de8872f1698bf053
change-id: 20261015-v4l-y8-y10-csi-vicap-bf049dca7988

Best regards,
--  
Quentin Schulz <quentin.schulz at cherry.de>




More information about the Linux-rockchip mailing list