[v3,2/5] media: uapi: Add MEDIA_BUS_FMT_SENSOR_DATA media bus format
Commit Message
From: Naushir Patuck <naush@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@raspberrypi.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
.../media/v4l/subdev-formats.rst | 32 +++++++++++++++++++
include/uapi/linux/media-bus-format.h | 3 ++
2 files changed, 35 insertions(+)
Comments
Hi,
Am 02.11.20 um 17:52 schrieb Jacopo Mondi:
> From: Naushir Patuck <naush@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@raspberrypi.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
> .../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 c9b7bb3ca089d..113d3ac9272ac 100644
> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> @@ -7899,3 +7899,35 @@ formats.
> - 0x5001
> - Interleaved raw UYVY and JPEG image format with embedded meta-data
> used by Samsung S3C73MX camera sensors.
> +
> +
> +
> +.. _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 84fa53ffb13fc..3c2848e91c1b2 100644
> --- a/include/uapi/linux/media-bus-format.h
> +++ b/include/uapi/linux/media-bus-format.h
> @@ -156,4 +156,7 @@
> /* HSV - next is 0x6002 */
> #define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
>
> +/* Sensor ancillary metadata formats - next is 0x7002 */
> +#define MEDIA_BUS_FMT_SENSOR_DATA 0x7001
Hi, I also sent a patch using 0x7001 for metadata:
https://patchwork.kernel.org/project/linux-media/patch/20201030134609.30020-1-dafna.hirschfeld@collabora.com/
It is used for the inner metadata format of rkisp1.
Can we use the 0x7* codes for various metadata formats?
I mean, I can send a new version of my patch using 0x7002 for MEDIA_BUS_FMT_METADATA_FIXED ?
Or is it better to separate csi2 embedded data formats in it's own range of codes?
Thanks,
Dafna
> +
> #endif /* __LINUX_MEDIA_BUS_FORMAT_H */
>
On 02/11/2020 17:52, Jacopo Mondi wrote:
> From: Naushir Patuck <naush@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@raspberrypi.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This patch needs rebasing after MEDIA_BUS_FMT_METADATA_FIXED was added.
> ---
> .../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 c9b7bb3ca089d..113d3ac9272ac 100644
> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> @@ -7899,3 +7899,35 @@ formats.
> - 0x5001
> - Interleaved raw UYVY and JPEG image format with embedded meta-data
> used by Samsung S3C73MX camera sensors.
> +
> +
> +
> +.. _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.
Same comment as for the previous patch: this needs to be split up into two formats:
MEDIA_BUS_FMT_METADATA_CSI2_SENSOR_DATA and MEDIA_BUS_FMT_METADATA_CUSTOM_SENSOR_DATA.
> + <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 84fa53ffb13fc..3c2848e91c1b2 100644
> --- a/include/uapi/linux/media-bus-format.h
> +++ b/include/uapi/linux/media-bus-format.h
> @@ -156,4 +156,7 @@
> /* HSV - next is 0x6002 */
> #define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
>
> +/* Sensor ancillary metadata formats - next is 0x7002 */
> +#define MEDIA_BUS_FMT_SENSOR_DATA 0x7001
> +
> #endif /* __LINUX_MEDIA_BUS_FORMAT_H */
>
Regards,
Hans
@@ -7899,3 +7899,35 @@ formats.
- 0x5001
- Interleaved raw UYVY and JPEG image format with embedded meta-data
used by Samsung S3C73MX camera sensors.
+
+
+
+.. _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>`_
@@ -156,4 +156,7 @@
/* HSV - next is 0x6002 */
#define MEDIA_BUS_FMT_AHSV8888_1X32 0x6001
+/* Sensor ancillary metadata formats - next is 0x7002 */
+#define MEDIA_BUS_FMT_SENSOR_DATA 0x7001
+
#endif /* __LINUX_MEDIA_BUS_FORMAT_H */