mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [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

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®