Repository navigation
Enable OPE driver support for Agatti and Shikra - #1120
Nihal Kumar Gupta (nihal231998) wants to merge 14 commits into
Conversation
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
PR #1120 — validate-patchPR: #1120
Final Summary
|
PR #1120 — checker-log-analyzerPR: #1120
Detailed report: Full report
|
Introduce v4l2-isp.h in the Linux kernel uAPI. The header includes types for generic ISP configuration parameters and will be extended in the future with support for generic ISP statistics formats. Generic ISP parameters support is provided by introducing two new types that represent an extensible and versioned buffer of ISP configuration parameters. The v4l2_params_buffer represents the container for the ISP configuration data block. The generic type is defined with a 0-sized data member that the ISP driver implementations shall properly size according to their capabilities. The v4l2_params_block_header structure represents the header to be prepend to each ISP configuration block. Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Michael Riesch <michael.riesch@collabora.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Upstream-Status: Backport Link: https://lore.kernel.org/all/20251108-extensible-parameters-validation-v9-1-6a7e22aa57d0@ideasonboard.com/ (cherry picked from commit e36dbd1)
Add to the V4L2 framework helper functions to support drivers when validating a buffer of V4L2 ISP parameters. Driver shall use v4l2_isp_params_validate_buffer_size() to verify the size correctness of the data received from userspace, and after having copied the data to a kernel-only memory location, complete the validation by calling v4l2_isp_params_validate_buffer(). Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Michael Riesch <michael.riesch@collabora.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Upstream-Status: Backport Link: https://lore.kernel.org/all/20251108-extensible-parameters-validation-v9-5-6a7e22aa57d0@ideasonboard.com/
2966e7d to
7a34e1e
Compare
The v4l2_isp_params_block_info structure contains validation information that apply to a block -type- and not only to a specific ISP block implementation. Clarify this by renaming v4l2_isp_params_block_info in v4l2_isp_params_block_type_info and update the documentation and the users of v4l2-isp accordingly. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Upstream-Status: Backport Link: https://lore.kernel.org/all/20251114110213.523187-2-jacopo.mondi@ideasonboard.com/
Extend the v4l2-isp extensible format introduced for isp parameters buffers to the support buffers of ISP statistic. Like for ISP configuration purpose, that will help supporting various ISP hardware versions reporting different statistics data with less impact on userspace. Rename all 'v4l2_isp_params' types to generic 'v4l2_isp' types to prepare to use them for statistics as well and maintain the existing types for compatibility with existing userspace only. Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Upstream-Status: Backport Link: https://lore.kernel.org/all/20260627-extensible-stats-v3-1-3b600bb2db8b@ideasonboard.com/
7a34e1e to
496a13a
Compare
Rename v4l2_isp_params_buffer_size() to v4l2_isp_buffer_size() to support statistics. Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Upstream-Status: Backport Link: https://lore.kernel.org/all/20260627-extensible-stats-v3-3-3b600bb2db8b@ideasonboard.com/ Note: dropped the hunk touching drivers/media/platform/arm/mali-c55/mali-c55-params.c since that driver is absent from this tree.
…meters Add a V4L2 meta format code (V4L2_META_FMT_QCOM_ISP_PARAMS) for the Qualcomm CAMSS ISP parameter buffer. This format is used by the params video node exposed by CAMSS offline ISP drivers (e.g. OPE) to carry ISP tuning data such as white balance, color correction and chroma enhancement settings. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Upstream-Status: Submitted Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-1-2622411034cb@oss.qualcomm.com/
…ne (OPE) Add Devicetree binding documentation for the Qualcomm Camera Subsystem Offline Processing Engine (OPE) found on platforms such as Agatti. The OPE is a memory-to-memory image processing block which operates on frames read from and written back to system memory. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Upstream-Status: Submitted Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-2-2622411034cb@oss.qualcomm.com/
… compatible Shikra uses the same Offline Processing Engine hardware as QCM2290, add qcom,shikra-camss-ope compatible string with qcom,qcm2290-camss-ope as the fallback. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com> Upstream-Status: Submitted Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-3-2622411034cb@oss.qualcomm.com/
Add the uapi header qcom-camss-config.h defining the ISP parameter structures used by the CAMSS Offline Processing Engine (OPE) driver. This includes structures for white balance, chroma enhancement and color correction configuration. The block type enum is shared across CAMSS ISPs so that userspace only has to deal with a single set of block identifiers. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Upstream-Status: Submitted Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-4-2622411034cb@oss.qualcomm.com/
…entation Add documentation for the Qualcomm CAMSS ISP parameters metadata format (V4L2_META_FMT_QCOM_ISP_PARAMS). The format is built on the V4L2 extensible ISP parameters system, with per-block structs defined in the qcom-camss-config.h uAPI header, and is designed to be shared by any CAMSS ISP engine exposing a parameters metadata output video node. The Offline Processing Engine (OPE) ope_params node is the first consumer, with additional engines expected to add their own parameter blocks in the future. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Upstream-Status: Submitted Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-5-2622411034cb@oss.qualcomm.com/
Add an image processing driver for the Qualcomm Offline Processing Engine
(OPE). OPE is a memory-to-memory ISP block that converts raw Bayer
frames to YUV, performing white balance, demosaic, chroma enhancement,
color correction and downscaling.
The hardware architecture consists of Fetch Engines and Write Engines,
connected through intermediate pipeline modules for pix processing.
The driver exposes three video nodes per pipeline instance:
- ope_input: Bayer RAW input (V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
- ope_disp_output: YUV output (V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)
- ope_params: ISP parameters (V4L2_BUF_TYPE_META_OUTPUT)
Hardware features:
- Stripe-based processing (up to 336 pixels wide per stripe)
- White balance (CLC_WB)
- Demosaic / Bayer-to-RGB (CLC_DEMO)
- Color correction matrix (CLC_CC)
- Gamma LUT (CLC_GAMMA)
- RGB-to-YUV conversion (CLC_CHROMA_ENHAN)
- MN downscaler for chroma and luma planes
Default configuration values are based on public standards such as BT.601.
Processing Model:
OPE processes frames in stripes of up to 336 pixels. Therefore, frames
must be split into stripes for processing. Each stripe is configured after
the previous one has been acquired (double buffered registers). To minimize
inter-stripe latency, stripe configurations are generated ahead of time.
The driver is split into three source files under the ope/ directory:
- core.c: the OPE m2m driver itself: probe, power management, V4L2/media
device setup, format handling, stripe generation and hardware
programming.
- pipeline.c/.h: a small declarative media-controller topology builder.
Drivers describe their entire media graph, entities (video devices,
subdevs, or base entities), their pads, and the links between them, in
a static descriptor table. The builder validates the table, allocates
and registers all entities, and creates all MC pad links. It is kept
generic but currently only used by OPE.
- params.c/.h: V4L2 ISP parameter buffer validation and dispatch. It
wraps the extensible V4L2 ISP parameters buffer format, validating
the buffer size and each per-block header before forwarding every
block to its driver-supplied handler.
A userspace libcamera support can be found at:
https://github.com/jwrdegoede/libcamera/commits/camss_pipeline_v2.1/
A test tool, camss-isp-m2m, can be found at:
https://github.com/loicpoulain/camss-isp-m2m-test
Assisted-by: LLM
Co-developed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Link: https://github.com/jwrdegoede/libcamera/commits/camss_pipeline_v2.1/
Link: https://github.com/loicpoulain/camss-isp-m2m-test
Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Upstream-Status: Submitted
Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-6-2622411034cb@oss.qualcomm.com/
Add the Offline Processing Engine (OPE) device tree node for the Agatti platform (QCM2290). The node describes the six register regions (cdm, top, qos, pipeline, bus_read, bus_write), clocks, interrupt, interconnects, IOMMU mappings, and OPP table. OPE is a memory-to-memory block with no board-level dependencies, so the node is left enabled for all Agatti boards. Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Upstream-Status: Submitted Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-7-2622411034cb@oss.qualcomm.com/
Add the Offline Processing Engine (OPE) device tree node for Shikra. The node describes the six register regions (cdm, top, qos, pipeline, bus_read, bus_write), clocks, interrupt, interconnects, IOMMU mappings, and OPP table. OPE is a memory-to-memory block with no board-level dependencies, so the node is left enabled for all Shikra boards. Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Signed-off-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com> Upstream-Status: Submitted Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-8-2622411034cb@oss.qualcomm.com/
Add CONFIG_VIDEO_QCOM_CAMSS_OPE=m to enable the Qualcomm Offline Processing Engine (OPE) driver, an image processing block available on Qualcomm Agatti and Shikra based platforms such as the Arduino UNO Q. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Signed-off-by: Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com> Upstream-Status: Submitted Link: https://lore.kernel.org/all/20260925-camss-isp-ope-v10-9-2622411034cb@oss.qualcomm.com/
444ce10 to
14951cb
Compare
|
LGTM |
Test Matrix
|
This series enable OPE driver support for Agatti and Shikra
CRs-Fixed: 4677262