← Documents Documentation/admin-guide/media/c3-isp.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Media

Amlogic C3 Image Signal Processing (C3ISP) driver

C308L C3ISP hardware pipeline, V4L2 sub-device topology, runtime parameter와 statistics interface를 설명합니다.

Source pathDocumentation/admin-guide/media/c3-isp.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Hardware pipeline

c3-isp.rst:1-47

MIPI CSI-2에서 ISP와 3개 resizer·WRMIF로 이어지는 data path를 보여 줍니다.

V4L2 topology와 구현

c3-isp.rst:48-101

Sub-device, video node, meta format, libcamera 연동을 정리합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
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.
102

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Amlogic C3ISP driver 소개

1-21

이 문서는 `drivers/media/platform/amlogic/c3/isp`에 있는 Amlogic C3 Image Signal Processing(C3ISP) driver를 설명합니다.

현재 driver는 Amlogic C308L processor의 C3ISP를 지원하며 V4L2, Media controller, V4L2 subdev interface를 구현합니다. Kernel에서 V4L2 subdev interface를 사용하는 camera sensor도 지원합니다.

Driver는 AW419-C308L-Socket platform에서 시험되었습니다.

C308L camera hardware pipeline

22-47

Driver가 지원하는 C308L camera hardware는 다음 module로 구성됩니다.

수량Module역할
1`MIPI-CSI-2`MIPI CSI-2 receiver의 physical layer를 처리하고 연결된 camera sensor에서 data를 받습니다.
1`MIPI-ADAPTER`MIPI data를 ISP input 요구 사항에 맞게 정리해 ISP로 보냅니다.
1`ISP`Image-processing hardware block의 pipeline입니다. 끝에는 각각 DMA write interface인 WRMIF에 연결된 resizer 세 개가 있습니다.
C3 ISP 기능 흐름
SensorMIPI CSI-2MIPI ADAPTERISPResizer 0WRMIF 0
SensorMIPI CSI-2MIPI ADAPTERISPResizer 1WRMIF 1
SensorMIPI CSI-2MIPI ADAPTERISPResizer 2WRMIF 2

Sensor data는 CSI-2 receiver와 adapter, ISP를 지난 뒤 세 resizer branch에서 각각 WRMIF를 통해 memory에 기록됩니다.

Driver architecture와 media topology

48-84

Hardware module 사이 link를 model로 만들고 깔끔하고 논리적이며 사용 가능한 interface를 노출하기 위해 driver는 다음 V4L2 sub-device를 등록합니다.

개수Sub-device기능
1`c3-mipi-csi2`MIPI CSI-2 receiver
1`c3-mipi-adapter`MIPI adapter
1`c3-isp-core`ISP core
3`c3-isp-resizer`ISP resizer

`c3-isp-core` sub-device는 statistics capture용 `c3-isp-stats` capture video device node와 parameter programming용 `c3-isp-params` output video device node에 연결됩니다.

Resizer sub-deviceCapture video device
`c3-isp-resizer0``c3-isp-cap0`
`c3-isp-resizer1``c3-isp-cap1`
`c3-isp-resizer2``c3-isp-cap2`

IMX290 camera sensor를 연결한 media controller pipeline graph는 원문의 anchor `isp_topology_graph`와 `c3-isp.dot` kernel figure로 제공되며 caption은 `Media pipeline topology`입니다.

C3ISP media controller topology
IMX290 sensorc3-mipi-csi2c3-mipi-adapterc3-isp-corec3-isp-resizer0c3-isp-cap0
IMX290 sensorc3-mipi-csi2c3-mipi-adapterc3-isp-corec3-isp-resizer1c3-isp-cap1
IMX290 sensorc3-mipi-csi2c3-mipi-adapterc3-isp-corec3-isp-resizer2c3-isp-cap2
c3-isp-corec3-isp-stats
c3-isp-paramsc3-isp-core

Sensor에서 ISP core로 들어온 data가 capture branch 세 개와 statistics·parameter node로 연결되는 논리 topology입니다.

Runtime 설정과 image capture

85-101

ISP hardware의 runtime 설정은 `c3-isp-params` video device node에서 `V4L2_META_FMT_C3ISP_PARAMS` data format을 사용해 수행합니다. Buffer 구조는 `c3_isp_params_cfg`로 정의됩니다.

Statistics는 `c3-isp-stats` video device node에서 `V4L2_META_FMT_C3ISP_STATS` data format으로 capture합니다.

최종 picture size와 format은 `c3-isp-cap[0, 2]` video device node의 V4L2 video capture interface로 설정합니다.

Amlogic C3 ISP는 runtime image correction과 enhancement를 수행하는 전용 pipeline handler 및 algorithm과 함께 `libcamera`에서 지원됩니다.