Documentation/admin-guide/media/c3-isp.rst
.. SPDX-License-Identifier: (GPL-2.0-only OR MIT)
.. include:: <isonum.txt>
This file documents the Amlogic C3ISP driver located under drivers/media/platform/amlogic/c3/isp.
The current version of the driver supports the C3ISP found on Amlogic C308L processor.
The driver implements V4L2, Media controller and V4L2 subdev interfaces. Camera sensor using V4L2 subdev interface in the kernel is supported.
The driver has been tested on AW419-C308L-Socket platform.
The Camera hardware found on C308L processors and supported by the driver consists of:
A high-level functional view of the C3 ISP is presented below.::
+----------+ +-------+
| Resizer |--->| WRMIF |
+---------+ +------------+ +--------------+ +-------+ |----------+ +-------+ | Sensor |--->| MIPI CSI-2 |--->| MIPI ADAPTER |--->| ISP |---|----------+ +-------+ +---------+ +------------+ +--------------+ +-------+ | Resizer |--->| WRMIF | +----------+ +-------+ |----------+ +-------+ | Resizer |--->| WRMIF | +----------+ +-------+
With the goal to model the hardware links between the modules and to expose a clean, logical and usable interface, the driver registers the following V4L2 sub-devices:
c3-mipi-csi2 sub-device - the MIPI CSI-2 receiverc3-mipi-adapter sub-device - the MIPI adapterc3-isp-core sub-device - the ISP corec3-isp-resizer sub-devices - the ISP resizersThe c3-isp-core sub-device is linked to 2 video device nodes for statistics
capture and parameters programming:
c3-isp-stats capture video device node for statistics capturec3-isp-params output video device for parameters programmingEach c3-isp-resizer sub-device is linked to a capture video device node where
frames are captured from:
c3-isp-resizer0 is linked to the c3-isp-cap0 capture video devicec3-isp-resizer1 is linked to the c3-isp-cap1 capture video devicec3-isp-resizer2 is linked to the c3-isp-cap2 capture video deviceThe media controller pipeline graph is as follows (with connected a IMX290 camera sensor):
.. _isp_topology_graph:
.. kernel-figure:: c3-isp.dot :alt: c3-isp.dot :align: center
Media pipeline topology
Runtime configuration of the ISP hardware is performed on the c3-isp-params
video device node using the :ref:V4L2_META_FMT_C3ISP_PARAMS <v4l2-meta-fmt-c3isp-params> as data format. The buffer structure is defined by
:c:type:c3_isp_params_cfg.
Statistics are captured from the c3-isp-stats video device node using the
:ref:V4L2_META_FMT_C3ISP_STATS <v4l2-meta-fmt-c3isp-stats> data format.
The final picture size and format is configured using the V4L2 video
capture interface on the c3-isp-cap[0, 2] video device nodes.
The Amlogic C3 ISP is supported by libcamera <https://libcamera.org>_ with a
dedicated pipeline handler and algorithms that perform run-time image correction
and enhancement.