요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
============================================
Raspberry Pi PiSP Camera Front End (rp1-cfe)
============================================
The PiSP Camera Front End
=========================
The PiSP Camera Front End (CFE) is a module which combines a CSI-2 receiver with
a simple ISP, called the Front End (FE).
The CFE has four DMA engines and can write frames from four separate streams
received from the CSI-2 to the memory. One of those streams can also be routed
directly to the FE, which can do minimal image processing, write two versions
(e.g. non-scaled and downscaled versions) of the received frames to memory and
provide statistics of the received frames.
The FE registers are documented in the `Raspberry Pi Image Signal Processor
(ISP) Specification document
<https://datasheets.raspberrypi.com/camera/raspberry-pi-image-signal-processor-specification.pdf>`_,
and example code for FE can be found in `libpisp
<https://github.com/raspberrypi/libpisp>`_.
The rp1-cfe driver
==================
The Raspberry Pi PiSP Camera Front End (rp1-cfe) driver is located under
drivers/media/platform/raspberrypi/rp1-cfe. It uses the `V4L2 API` to register
a number of video capture and output devices, the `V4L2 subdev API` to register
subdevices for the CSI-2 received and the FE that connects the video devices in
a single media graph realized using the `Media Controller (MC) API`.
The media topology registered by the `rp1-cfe` driver, in this particular
example connected to an imx219 sensor, is the following one:
.. _rp1-cfe-topology:
.. kernel-figure:: raspberrypi-rp1-cfe.dot
:alt: Diagram of an example media pipeline topology
:align: center
The media graph contains the following video device nodes:
- rp1-cfe-csi2-ch0: capture device for the first CSI-2 stream
- rp1-cfe-csi2-ch1: capture device for the second CSI-2 stream
- rp1-cfe-csi2-ch2: capture device for the third CSI-2 stream
- rp1-cfe-csi2-ch3: capture device for the fourth CSI-2 stream
- rp1-cfe-fe-image0: capture device for the first FE output
- rp1-cfe-fe-image1: capture device for the second FE output
- rp1-cfe-fe-stats: capture device for the FE statistics
- rp1-cfe-fe-config: output device for FE configuration
rp1-cfe-csi2-chX
----------------
The rp1-cfe-csi2-chX capture devices are normal V4L2 capture devices which
can be used to capture video frames or metadata received from the CSI-2.
rp1-cfe-fe-image0, rp1-cfe-fe-image1
------------------------------------
The rp1-cfe-fe-image0 and rp1-cfe-fe-image1 capture devices are used to write
the processed frames to memory.
rp1-cfe-fe-stats
----------------
The format of the FE statistics buffer is defined by
:c:type:`pisp_statistics` C structure and the meaning of each parameter is
described in the `PiSP specification` document.
rp1-cfe-fe-config
-----------------
The format of the FE configuration buffer is defined by
:c:type:`pisp_fe_config` C structure and the meaning of each parameter is
described in the `PiSP specification` document.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
PiSP Camera Front End 개요
1-24PiSP 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-42Raspberry 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를 보여 줍니다.
실선은 기본 활성 link, dashed link는 선택 가능한 route입니다. CSI-2 stream 하나를 FE로 보내 image 두 개와 statistics를 만들 수 있습니다.
등록되는 video device node
43-53| Node | Device | Queue direction | 용도 |
|---|---|---|---|
| rp1-cfe-csi2-ch0 | /dev/video0 | capture | 첫 번째 CSI-2 stream |
| rp1-cfe-csi2-ch1 | /dev/video1 | capture | 두 번째 CSI-2 stream |
| rp1-cfe-csi2-ch2 | /dev/video2 | capture | 세 번째 CSI-2 stream |
| rp1-cfe-csi2-ch3 | /dev/video3 | capture | 네 번째 CSI-2 stream |
| rp1-cfe-fe-image0 | /dev/video4 | capture | 첫 번째 FE image 출력 |
| rp1-cfe-fe-image1 | /dev/video5 | capture | 두 번째 FE image 출력 |
| rp1-cfe-fe-stats | /dev/video6 | capture | FE statistics 출력 |
| rp1-cfe-fe-config | /dev/video7 | output | FE 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-72FE statistics buffer format은 `pisp_statistics` C structure로 정의되며, 각 parameter의 의미는 `PiSP specification` document에 설명되어 있습니다.
rp1-cfe-fe-config
73-78FE configuration buffer format은 `pisp_fe_config` C structure로 정의되며, 각 parameter의 의미는 `PiSP specification` document에 설명되어 있습니다.
RP1 CFE data flow
raspberrypi-rp1-cfe.rst:1-78RP1 CFE는 CSI-2의 네 stream을 직접 capture할 수 있고, 선택한 한 stream은 FE에서 최소 processing을 거쳐 두 image version과 statistics로 출력됩니다. 별도 output node가 FE configuration buffer를 공급합니다.