048aa195c8a7a888f7a461a19eeefecf94dfd00e
[openwrt/staging/jow.git] /
1 From defe535a8dd73134a798afd968195af3a0533b0d Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Tue, 21 Jan 2020 14:06:47 +0000
4 Subject: [PATCH] media: uapi: Add MEDIA_BUS_FMT_SENSOR_DATA media bus
5 format
6
7 This patch adds MEDIA_BUS_FMT_SENSOR_DATA used by the bcm2835-unicam
8 driver to support CSI-2 embedded data streams from camera sensors.
9
10 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
11 ---
12 .../media/v4l/subdev-formats.rst | 32 +++++++++++++++++++
13 include/uapi/linux/media-bus-format.h | 3 ++
14 2 files changed, 35 insertions(+)
15
16 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
17 +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
18 @@ -8086,3 +8086,35 @@ The following table lists the existing m
19 both sides of the link and the bus format is a fixed
20 metadata format that is not configurable from userspace.
21 Width and height will be set to 0 for this format.
22 +
23 +
24 +.. _v4l2-mbus-sensor-data:
25 +
26 +Sensor Ancillary Metadata Formats
27 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 +
29 +This section lists ancillary data generated by a camera sensor and
30 +transmitted over a stream on the camera bus.
31 +
32 +The following table lists the existing sensor ancillary metadata formats:
33 +
34 +
35 +.. _v4l2-mbus-pixelcode-sensor-metadata:
36 +
37 +.. tabularcolumns:: |p{8.0cm}|p{1.4cm}|p{7.7cm}|
38 +
39 +.. flat-table:: Sensor ancillary metadata formats
40 + :header-rows: 1
41 + :stub-columns: 0
42 +
43 + * - Identifier
44 + - Code
45 + - Comments
46 + * .. _MEDIA_BUS_FMT_SENSOR_DATA:
47 +
48 + - MEDIA_BUS_FMT_SENSOR_DATA
49 + - 0x7001
50 + - Sensor vendor specific ancillary metadata. Some vendors follow a generic
51 + CSI-2/SMIA embedded data format as described in the `CSI-2 specification.
52 + <https://mipi.org/specifications/csi-2>`_
53 +
54 --- a/include/uapi/linux/media-bus-format.h
55 +++ b/include/uapi/linux/media-bus-format.h
56 @@ -172,4 +172,7 @@
57 */
58 #define MEDIA_BUS_FMT_METADATA_FIXED 0x7001
59
60 +/* Sensor ancillary metadata formats - next is 0x7002 */
61 +#define MEDIA_BUS_FMT_SENSOR_DATA 0x7002
62 +
63 #endif /* __LINUX_MEDIA_BUS_FORMAT_H */