[v3,0/7] camss: Add CAMSS pipeline handler
mbox series

Message ID 20261106151345.32491-1-johannes.goede@oss.qualcomm.com
Headers show
Series
  • camss: Add CAMSS pipeline handler
Related show

Message

Hans de Goede Nov. 6, 2026, 3:13 p.m. UTC
Add a CAMSS pipeline handler. This series consists of 2 parts:

1. A basic version which basically replaces the simple pipeline handler
camss support, while still using the softISP. Compared to the simple
pipeline handler this gains us support for streaming from multiple
cameras at once (through pipewire) since this assigns unique csid and
vfe resources to each camera rather then always using csid0 + vfe0 for
all cameras.

This consists of patches 1-4 and this is necessary to support
simultaneous streaming of multiple cameras on the Arduino UNO Q and
the Arduino VENTUNO Q. This part is ready for merging from my pov and
it would be good if we can get this reviewed and move towards getting
this upstreamed.

2. Patches 5-7 add support for the Offline Processing Engine (OPE) offline
ISP found on the Dragonwing QRB2210 (Agatti) SoC. This is based on the v13
OPE kernel patch-series:
https://lore.kernel.org/linux-media/20261103-camss-isp-ope-v13-0-c2cbf15a39b1@oss.qualcomm.com/

This part of the patch series is more in a RFC status, because:
a) The kernel patches are not yet accepted so the uAPI might still change,
   this is unlikely though since the series is pretty mature now and will
   hopefully get merged soon.
b) ATM it (ab)uses the softISP IPA instead of using its own IPA, the plan
   is to change this for the next version, based on the recently landed
   libipa rework.

Changes since the v2 series:
- Rebase on top of libcamera-0.8.0
  - 0.8.0 includes all dependencies which were not upstream yet during v2
- Add a new "dummy ISP class for raw only image capture", which enables
  raw capturing, with all the metadata provided by the softIPA in place
  so that the images can be used for sensor calibration
- Add CCM support to the parameters send to the OPE

v2 link:
https://lists.libcamera.org/pipermail/libcamera-devel/2026-July/060426.html

Changes since the v1/RFC (**) series:
- Drop fine grained locking support. This is replaced with using pipewire
  to allow simultaneous access to multiple cameras while still having only
  a single libcamera instance, removing the need for fine grained locking
- Add 2 small preperation patches + a camss_util.cpp file with some helper
  functions
- The OPE pipeline-handling is now based on the v4 kernel series which
  introduces a proper media-controller centric ISP driver with multiple
  input queues (raw-frames + parameters) replacing the previous M2M based
  proof-of-concept kernel driver
- Add linux/camss-config.h+camss_params.h using the generic ISP parameters
  framework (these are subject to change until the kernel driver is merged)

Since this will replace the simple pipeline handler support more
testing on other platforms with different camera setups, e.g. various
phones would be appreciated to avoid e.g. postmarketOS camera support
regressing when this lands.

Regards,

Hans



Hans de Goede (7):
  libcamera: V4L2Subdevice: Add whence argument to [get|set]Selection()
  camss: Add camss utility functions
  camss: Add camss pipeline handler
  camss: Add dummy ISP class for raw only image capture
  camss: Add include/linux/qcom-camss-config.h
  camss: Add camss_params.h
  camss: Add Offline Processing Engine ISP support

 include/libcamera/internal/v4l2_subdevice.h   |  14 +-
 include/libcamera/ipa/meson.build             |   1 +
 include/linux/qcom-camss-config.h             | 217 ++++++
 meson.build                                   |   1 +
 meson_options.txt                             |   1 +
 src/ipa/meson.build                           |   1 +
 src/libcamera/pipeline/camss/camss.cpp        | 707 ++++++++++++++++++
 src/libcamera/pipeline/camss/camss_csi.cpp    | 571 ++++++++++++++
 src/libcamera/pipeline/camss/camss_csi.h      | 129 ++++
 src/libcamera/pipeline/camss/camss_frames.cpp | 153 ++++
 src/libcamera/pipeline/camss/camss_frames.h   |  70 ++
 src/libcamera/pipeline/camss/camss_isp.cpp    |  26 +
 src/libcamera/pipeline/camss/camss_isp.h      |  64 ++
 .../pipeline/camss/camss_isp_ope.cpp          | 704 +++++++++++++++++
 src/libcamera/pipeline/camss/camss_isp_ope.h  | 120 +++
 .../pipeline/camss/camss_isp_raw.cpp          | 228 ++++++
 src/libcamera/pipeline/camss/camss_isp_raw.h  |  72 ++
 .../pipeline/camss/camss_isp_soft.cpp         | 227 ++++++
 src/libcamera/pipeline/camss/camss_isp_soft.h |  57 ++
 src/libcamera/pipeline/camss/camss_params.h   |  71 ++
 src/libcamera/pipeline/camss/camss_util.cpp   |  39 +
 src/libcamera/pipeline/camss/camss_util.h     |  19 +
 src/libcamera/pipeline/camss/meson.build      |  14 +
 src/libcamera/pipeline/simple/simple.cpp      |   1 -
 src/libcamera/v4l2_subdevice.cpp              |  20 +-
 25 files changed, 3514 insertions(+), 13 deletions(-)
 create mode 100644 include/linux/qcom-camss-config.h
 create mode 100644 src/libcamera/pipeline/camss/camss.cpp
 create mode 100644 src/libcamera/pipeline/camss/camss_csi.cpp
 create mode 100644 src/libcamera/pipeline/camss/camss_csi.h
 create mode 100644 src/libcamera/pipeline/camss/camss_frames.cpp
 create mode 100644 src/libcamera/pipeline/camss/camss_frames.h
 create mode 100644 src/libcamera/pipeline/camss/camss_isp.cpp
 create mode 100644 src/libcamera/pipeline/camss/camss_isp.h
 create mode 100644 src/libcamera/pipeline/camss/camss_isp_ope.cpp
 create mode 100644 src/libcamera/pipeline/camss/camss_isp_ope.h
 create mode 100644 src/libcamera/pipeline/camss/camss_isp_raw.cpp
 create mode 100644 src/libcamera/pipeline/camss/camss_isp_raw.h
 create mode 100644 src/libcamera/pipeline/camss/camss_isp_soft.cpp
 create mode 100644 src/libcamera/pipeline/camss/camss_isp_soft.h
 create mode 100644 src/libcamera/pipeline/camss/camss_params.h
 create mode 100644 src/libcamera/pipeline/camss/camss_util.cpp
 create mode 100644 src/libcamera/pipeline/camss/camss_util.h
 create mode 100644 src/libcamera/pipeline/camss/meson.build