Debian Codegraph @

Documentation/admin-guide/media/raspberrypi-rp1-cfe.rst

raw
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.