[SRU][N:linux-xilinx][PATCH 13/14] media: uapi: Add MEDIA_BUS_FMT_SENSOR_DATA media bus format
Stewart Hore
stewart.hore at canonical.com
Wed Oct 15 00:26:08 UTC 2025
From: Naushir Patuck <naush at raspberrypi.com>
This patch adds MEDIA_BUS_FMT_SENSOR_DATA used by the bcm2835-unicam
driver to support CSI-2 embedded data streams from camera sensors.
Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
(cherry picked from commit 4f9064c1b124865f0fd3311c68197b4f4e3541fb rpi-6.6.y)
Signed-off-by: Juerg Haefliger <juerg.haefliger at canonical.com>
(cherry picked from commit 13ecbbba0729d4c0f9a7a21651d08d086bc4e358 noble:linux-raspi)
Signed-off-by: Stewart Hore <stewart.hore at canonical.com>
---
.../media/v4l/subdev-formats.rst | 32 +++++++++++++++++++
include/uapi/linux/media-bus-format.h | 3 ++
2 files changed, 35 insertions(+)
diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index 00bc8c1af5e0..ceb058d469d4 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -9141,3 +9141,35 @@ The following table lists the existing metadata formats.
both sides of the link and the bus format is a fixed
metadata format that is not configurable from userspace.
Width and height will be set to 0 for this format.
+
+
+.. _v4l2-mbus-sensor-data:
+
+Sensor Ancillary Metadata Formats
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This section lists ancillary data generated by a camera sensor and
+transmitted over a stream on the camera bus.
+
+The following table lists the existing sensor ancillary metadata formats:
+
+
+.. _v4l2-mbus-pixelcode-sensor-metadata:
+
+.. tabularcolumns:: |p{8.0cm}|p{1.4cm}|p{7.7cm}|
+
+.. flat-table:: Sensor ancillary metadata formats
+ :header-rows: 1
+ :stub-columns: 0
+
+ * - Identifier
+ - Code
+ - Comments
+ * .. _MEDIA_BUS_FMT_SENSOR_DATA:
+
+ - MEDIA_BUS_FMT_SENSOR_DATA
+ - 0x7001
+ - Sensor vendor specific ancillary metadata. Some vendors follow a generic
+ CSI-2/SMIA embedded data format as described in the `CSI-2 specification.
+ <https://mipi.org/specifications/csi-2>`_
+
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index b4a7f7276eed..81fb63dc0c06 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -189,4 +189,7 @@
*/
#define MEDIA_BUS_FMT_METADATA_FIXED 0x7001
+/* Sensor ancillary metadata formats - next is 0x7002 */
+#define MEDIA_BUS_FMT_SENSOR_DATA 0x7002
+
#endif /* __LINUX_MEDIA_BUS_FORMAT_H */
--
2.48.1
More information about the kernel-team
mailing list