← Documents Documentation/admin-guide/media/raspberrypi-rp1-cfe.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Media

Raspberry Pi PiSP Camera Front End

RP1 CFE의 CSI-2 receiver, 네 DMA stream, FE image·statistics output과 V4L2/Media Controller topology를 설명합니다.

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

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

1. 요약·해설

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

RP1 CFE data flow

raspberrypi-rp1-cfe.rst:1-78

RP1 CFE는 CSI-2의 네 stream을 직접 capture할 수 있고, 선택한 한 stream은 FE에서 최소 processing을 거쳐 두 image version과 statistics로 출력됩니다. 별도 output node가 FE configuration buffer를 공급합니다.

NodeDeviceQueue direction용도
rp1-cfe-csi2-ch0/dev/video0capture첫 번째 CSI-2 stream
rp1-cfe-csi2-ch1/dev/video1capture두 번째 CSI-2 stream
rp1-cfe-csi2-ch2/dev/video2capture세 번째 CSI-2 stream
rp1-cfe-csi2-ch3/dev/video3capture네 번째 CSI-2 stream
rp1-cfe-fe-image0/dev/video4capture첫 번째 FE image 출력
rp1-cfe-fe-image1/dev/video5capture두 번째 FE image 출력
rp1-cfe-fe-stats/dev/video6captureFE statistics 출력
rp1-cfe-fe-config/dev/video7outputFE configuration 입력

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ============================================
4 Raspberry Pi PiSP Camera Front End (rp1-cfe)
5 ============================================
6
7 The PiSP Camera Front End
8 =========================
9
10 The PiSP Camera Front End (CFE) is a module which combines a CSI-2 receiver with
11 a simple ISP, called the Front End (FE).
12
13 The CFE has four DMA engines and can write frames from four separate streams
14 received from the CSI-2 to the memory. One of those streams can also be routed
15 directly to the FE, which can do minimal image processing, write two versions
16 (e.g. non-scaled and downscaled versions) of the received frames to memory and
17 provide statistics of the received frames.
18
19 The FE registers are documented in the `Raspberry Pi Image Signal Processor
20 (ISP) Specification document
21 <https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf>`_,
22 and example code for FE can be found in `libpisp
23 <https://github.com/raspberrypi/libpisp>`_.
24
25 The rp1-cfe driver
26 ==================
27
28 The Raspberry Pi PiSP Camera Front End (rp1-cfe) driver is located under
29 drivers/media/platform/raspberrypi/rp1-cfe. It uses the `V4L2 API` to register
30 a number of video capture and output devices, the `V4L2 subdev API` to register
31 subdevices for the CSI-2 received and the FE that connects the video devices in
32 a single media graph realized using the `Media Controller (MC) API`.
33
34 The media topology registered by the `rp1-cfe` driver, in this particular
35 example connected to an imx219 sensor, is the following one:
36
37 .. _rp1-cfe-topology:
38
39 .. kernel-figure:: raspberrypi-rp1-cfe.dot
40 :alt: Diagram of an example media pipeline topology
41 :align: center
42
43 The media graph contains the following video device nodes:
44
45 - rp1-cfe-csi2-ch0: capture device for the first CSI-2 stream
46 - rp1-cfe-csi2-ch1: capture device for the second CSI-2 stream
47 - rp1-cfe-csi2-ch2: capture device for the third CSI-2 stream
48 - rp1-cfe-csi2-ch3: capture device for the fourth CSI-2 stream
49 - rp1-cfe-fe-image0: capture device for the first FE output
50 - rp1-cfe-fe-image1: capture device for the second FE output
51 - rp1-cfe-fe-stats: capture device for the FE statistics
52 - rp1-cfe-fe-config: output device for FE configuration
53
54 rp1-cfe-csi2-chX
55 ----------------
56
57 The rp1-cfe-csi2-chX capture devices are normal V4L2 capture devices which
58 can be used to capture video frames or metadata received from the CSI-2.
59
60 rp1-cfe-fe-image0, rp1-cfe-fe-image1
61 ------------------------------------
62
63 The rp1-cfe-fe-image0 and rp1-cfe-fe-image1 capture devices are used to write
64 the processed frames to memory.
65
66 rp1-cfe-fe-stats
67 ----------------
68
69 The format of the FE statistics buffer is defined by
70 :c:type:`pisp_statistics` C structure and the meaning of each parameter is
71 described in the `PiSP specification` document.
72
73 rp1-cfe-fe-config
74 -----------------
75
76 The format of the FE configuration buffer is defined by
77 :c:type:`pisp_fe_config` C structure and the meaning of each parameter is
78 described in the `PiSP specification` document.
79

3. 한국어 전문 번역

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

PiSP Camera Front End 개요

1-24

PiSP Camera Front End(CFE)는 CSI-2 receiver와 Front End(FE)라는 간단한 ISP를 결합한 module입니다.

CFE에는 네 DMA engine이 있으며 CSI-2에서 받은 서로 다른 네 stream의 frame을 memory에 기록할 수 있습니다. 그중 한 stream은 FE로 직접 route할 수도 있습니다. FE는 최소한의 image processing을 수행하고, 수신 frame의 두 version(예: non-scaled와 downscaled version)을 memory에 기록하며, frame statistics도 제공합니다.

FE register는 Raspberry Pi Image Signal Processor(ISP) Specification document(https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf)에 설명되어 있고, FE example code는 libpisp(https://github.com/raspberrypi/libpisp)에서 찾을 수 있습니다.

rp1-cfe driver와 media graph

25-42

Raspberry Pi PiSP Camera Front End(`rp1-cfe`) driver는 `drivers/media/platform/raspberrypi/rp1-cfe`에 있습니다. 이 driver는 `V4L2 API`로 여러 video capture/output device를 등록하고, `V4L2 subdev API`로 CSI-2 receiver와 FE subdevice를 등록합니다. 이들은 `Media Controller (MC) API`로 구성한 하나의 media graph에서 video device들을 연결합니다.

원문의 `raspberrypi-rp1-cfe.dot` 예시는 `imx219` sensor가 CSI-2 subdevice에 연결되고, 네 CSI-2 channel과 선택된 한 stream의 FE processing path가 `/dev/video0-7`에 mapping된 topology를 보여 줍니다.

RP1 CFE media topology
imx219 /dev/v4l-subdev2csi2 /dev/v4l-subdev0rp1-cfe-csi2-ch0-3/dev/video0-3
선택한 CSI-2 streampisp-fe /dev/v4l-subdev1rp1-cfe-fe-image0-1/dev/video4-5
선택한 CSI-2 streampisp-ferp1-cfe-fe-stats/dev/video6
rp1-cfe-fe-config /dev/video7pisp-fe configuration port

실선은 기본 활성 link, dashed link는 선택 가능한 route입니다. CSI-2 stream 하나를 FE로 보내 image 두 개와 statistics를 만들 수 있습니다.

등록되는 video device node

43-53
NodeDeviceQueue direction용도
rp1-cfe-csi2-ch0/dev/video0capture첫 번째 CSI-2 stream
rp1-cfe-csi2-ch1/dev/video1capture두 번째 CSI-2 stream
rp1-cfe-csi2-ch2/dev/video2capture세 번째 CSI-2 stream
rp1-cfe-csi2-ch3/dev/video3capture네 번째 CSI-2 stream
rp1-cfe-fe-image0/dev/video4capture첫 번째 FE image 출력
rp1-cfe-fe-image1/dev/video5capture두 번째 FE image 출력
rp1-cfe-fe-stats/dev/video6captureFE statistics 출력
rp1-cfe-fe-config/dev/video7outputFE configuration 입력

rp1-cfe-csi2-chX

54-59

`rp1-cfe-csi2-chX` capture device는 일반적인 V4L2 capture device이며, CSI-2에서 수신한 video frame 또는 metadata를 capture하는 데 사용할 수 있습니다.

rp1-cfe-fe-image0과 rp1-cfe-fe-image1

60-65

`rp1-cfe-fe-image0`과 `rp1-cfe-fe-image1` capture device는 처리된 frame을 memory에 기록하는 데 사용됩니다.

rp1-cfe-fe-stats

66-72

FE statistics buffer format은 `pisp_statistics` C structure로 정의되며, 각 parameter의 의미는 `PiSP specification` document에 설명되어 있습니다.

rp1-cfe-fe-config

73-78

FE configuration buffer format은 `pisp_fe_config` C structure로 정의되며, 각 parameter의 의미는 `PiSP specification` document에 설명되어 있습니다.