Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: media: Add documentation file c3-isp.rst

Add the file 'c3-isp.rst' that documents the c3-isp driver.

Signed-off-by: Keke Li <keke.li@amlogic.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

authored by

Keke Li and committed by
Hans Verkuil
f8953ee9 f0d3a857

+130
+26
Documentation/admin-guide/media/c3-isp.dot
··· 1 + digraph board { 2 + rankdir=TB 3 + n00000001 [label="{{<port0> 0 | <port1> 1} | c3-isp-core\n/dev/v4l-subdev0 | {<port2> 2 | <port3> 3 | <port4> 4 | <port5> 5}}", shape=Mrecord, style=filled, fillcolor=green] 4 + n00000001:port3 -> n00000008:port0 5 + n00000001:port4 -> n0000000b:port0 6 + n00000001:port5 -> n0000000e:port0 7 + n00000001:port2 -> n00000027 8 + n00000008 [label="{{<port0> 0} | c3-isp-resizer0\n/dev/v4l-subdev1 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green] 9 + n00000008:port1 -> n00000016 [style=bold] 10 + n0000000b [label="{{<port0> 0} | c3-isp-resizer1\n/dev/v4l-subdev2 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green] 11 + n0000000b:port1 -> n0000001a [style=bold] 12 + n0000000e [label="{{<port0> 0} | c3-isp-resizer2\n/dev/v4l-subdev3 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green] 13 + n0000000e:port1 -> n00000023 [style=bold] 14 + n00000011 [label="{{<port0> 0} | c3-mipi-adapter\n/dev/v4l-subdev4 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green] 15 + n00000011:port1 -> n00000001:port0 [style=bold] 16 + n00000016 [label="c3-isp-cap0\n/dev/video0", shape=box, style=filled, fillcolor=yellow] 17 + n0000001a [label="c3-isp-cap1\n/dev/video1", shape=box, style=filled, fillcolor=yellow] 18 + n0000001e [label="{{<port0> 0} | c3-mipi-csi2\n/dev/v4l-subdev5 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green] 19 + n0000001e:port1 -> n00000011:port0 [style=bold] 20 + n00000023 [label="c3-isp-cap2\n/dev/video2", shape=box, style=filled, fillcolor=yellow] 21 + n00000027 [label="c3-isp-stats\n/dev/video3", shape=box, style=filled, fillcolor=yellow] 22 + n0000002b [label="c3-isp-params\n/dev/video4", shape=box, style=filled, fillcolor=yellow] 23 + n0000002b -> n00000001:port1 24 + n0000003f [label="{{} | imx290 2-001a\n/dev/v4l-subdev6 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green] 25 + n0000003f:port0 -> n0000001e:port0 [style=bold] 26 + }
+101
Documentation/admin-guide/media/c3-isp.rst
··· 1 + .. SPDX-License-Identifier: (GPL-2.0-only OR MIT) 2 + 3 + .. include:: <isonum.txt> 4 + 5 + ================================================= 6 + Amlogic C3 Image Signal Processing (C3ISP) driver 7 + ================================================= 8 + 9 + Introduction 10 + ============ 11 + 12 + This file documents the Amlogic C3ISP driver located under 13 + drivers/media/platform/amlogic/c3/isp. 14 + 15 + The current version of the driver supports the C3ISP found on 16 + Amlogic C308L processor. 17 + 18 + The driver implements V4L2, Media controller and V4L2 subdev interfaces. 19 + Camera sensor using V4L2 subdev interface in the kernel is supported. 20 + 21 + The driver has been tested on AW419-C308L-Socket platform. 22 + 23 + Amlogic C3 ISP 24 + ============== 25 + 26 + The Camera hardware found on C308L processors and supported by 27 + the driver consists of: 28 + 29 + - 1 MIPI-CSI-2 module: handles the physical layer of the MIPI CSI-2 receiver and 30 + receives data from the connected camera sensor. 31 + - 1 MIPI-ADAPTER module: organizes MIPI data to meet ISP input requirements and 32 + send MIPI data to ISP. 33 + - 1 ISP (Image Signal Processing) module: contains a pipeline of image processing 34 + hardware blocks. The ISP pipeline contains three resizers at the end each of 35 + them connected to a DMA interface which writes the output data to memory. 36 + 37 + A high-level functional view of the C3 ISP is presented below.:: 38 + 39 + +----------+ +-------+ 40 + | Resizer |--->| WRMIF | 41 + +---------+ +------------+ +--------------+ +-------+ |----------+ +-------+ 42 + | Sensor |--->| MIPI CSI-2 |--->| MIPI ADAPTER |--->| ISP |---|----------+ +-------+ 43 + +---------+ +------------+ +--------------+ +-------+ | Resizer |--->| WRMIF | 44 + +----------+ +-------+ 45 + |----------+ +-------+ 46 + | Resizer |--->| WRMIF | 47 + +----------+ +-------+ 48 + 49 + Driver architecture and design 50 + ============================== 51 + 52 + With the goal to model the hardware links between the modules and to expose a 53 + clean, logical and usable interface, the driver registers the following V4L2 54 + sub-devices: 55 + 56 + - 1 `c3-mipi-csi2` sub-device - the MIPI CSI-2 receiver 57 + - 1 `c3-mipi-adapter` sub-device - the MIPI adapter 58 + - 1 `c3-isp-core` sub-device - the ISP core 59 + - 3 `c3-isp-resizer` sub-devices - the ISP resizers 60 + 61 + The `c3-isp-core` sub-device is linked to 2 video device nodes for statistics 62 + capture and parameters programming: 63 + 64 + - the `c3-isp-stats` capture video device node for statistics capture 65 + - the `c3-isp-params` output video device for parameters programming 66 + 67 + Each `c3-isp-resizer` sub-device is linked to a capture video device node where 68 + frames are captured from: 69 + 70 + - `c3-isp-resizer0` is linked to the `c3-isp-cap0` capture video device 71 + - `c3-isp-resizer1` is linked to the `c3-isp-cap1` capture video device 72 + - `c3-isp-resizer2` is linked to the `c3-isp-cap2` capture video device 73 + 74 + The media controller pipeline graph is as follows (with connected a 75 + IMX290 camera sensor): 76 + 77 + .. _isp_topology_graph: 78 + 79 + .. kernel-figure:: c3-isp.dot 80 + :alt: c3-isp.dot 81 + :align: center 82 + 83 + Media pipeline topology 84 + 85 + Implementation 86 + ============== 87 + 88 + Runtime configuration of the ISP hardware is performed on the `c3-isp-params` 89 + video device node using the :ref:`V4L2_META_FMT_C3ISP_PARAMS 90 + <v4l2-meta-fmt-c3isp-params>` as data format. The buffer structure is defined by 91 + :c:type:`c3_isp_params_cfg`. 92 + 93 + Statistics are captured from the `c3-isp-stats` video device node using the 94 + :ref:`V4L2_META_FMT_C3ISP_STATS <v4l2-meta-fmt-c3isp-stats>` data format. 95 + 96 + The final picture size and format is configured using the V4L2 video 97 + capture interface on the `c3-isp-cap[0, 2]` video device nodes. 98 + 99 + The Amlogic C3 ISP is supported by `libcamera <https://libcamera.org>`_ with a 100 + dedicated pipeline handler and algorithms that perform run-time image correction 101 + and enhancement.
+1
Documentation/admin-guide/media/v4l-drivers.rst
··· 10 10 :maxdepth: 2 11 11 12 12 bttv 13 + c3-isp 13 14 cafe_ccic 14 15 cx88 15 16 fimc
+2
MAINTAINERS
··· 1258 1258 M: Keke Li <keke.li@amlogic.com> 1259 1259 L: linux-media@vger.kernel.org 1260 1260 S: Maintained 1261 + F: Documentation/admin-guide/media/c3-isp.dot 1262 + F: Documentation/admin-guide/media/c3-isp.rst 1261 1263 F: Documentation/devicetree/bindings/media/amlogic,c3-isp.yaml 1262 1264 F: Documentation/userspace-api/media/v4l/metafmt-c3-isp.rst 1263 1265 F: drivers/media/platform/amlogic/c3/isp/