media: uapi: Document which mbus format fields are valid for metadata
authorSakari Ailus <sakari.ailus@linux.intel.com>
Tue, 1 Aug 2023 13:15:36 +0000 (16:15 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 29 Apr 2024 12:56:36 +0000 (14:56 +0200)
Now that metadata mbus formats have been added, it is necessary to define
which fields in struct v4l2_mbus_format are applicable to them (not many).

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Documentation/userspace-api/media/v4l/subdev-formats.rst
include/uapi/linux/v4l2-mediabus.h

index c2cebf61d528baab9d34532cdd9458e3a68c208d..d2a6cd2e1eb2ce2380b9b645ae2b712cb8c59ce8 100644 (file)
@@ -33,7 +33,7 @@ Media Bus Formats
     * - __u32
       - ``field``
       - Field order, from enum :c:type:`v4l2_field`. See
-       :ref:`field-order` for details.
+       :ref:`field-order` for details. Zero for metadata mbus codes.
     * - __u32
       - ``colorspace``
       - Image colorspace, from enum :c:type:`v4l2_colorspace`.
@@ -45,7 +45,7 @@ Media Bus Formats
        conversion is supported by setting the flag
        V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE in the corresponding struct
        :c:type:`v4l2_subdev_mbus_code_enum` during enumeration.
-       See :ref:`v4l2-subdev-mbus-code-flags`.
+       See :ref:`v4l2-subdev-mbus-code-flags`. Zero for metadata mbus codes.
     * - union {
       - (anonymous)
     * - __u16
@@ -61,7 +61,7 @@ Media Bus Formats
        that ycbcr_enc conversion is supported by setting the flag
        V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC in the corresponding struct
        :c:type:`v4l2_subdev_mbus_code_enum` during enumeration.
-       See :ref:`v4l2-subdev-mbus-code-flags`.
+       See :ref:`v4l2-subdev-mbus-code-flags`. Zero for metadata mbus codes.
     * - __u16
       - ``hsv_enc``
       - HSV encoding, from enum :c:type:`v4l2_hsv_encoding`.
@@ -75,7 +75,7 @@ Media Bus Formats
        that hsv_enc conversion is supported by setting the flag
        V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC in the corresponding struct
        :c:type:`v4l2_subdev_mbus_code_enum` during enumeration.
-       See :ref:`v4l2-subdev-mbus-code-flags`
+       See :ref:`v4l2-subdev-mbus-code-flags`. Zero for metadata mbus codes.
     * - }
       -
     * - __u16
@@ -90,8 +90,8 @@ Media Bus Formats
        The driver indicates that quantization conversion is supported by
        setting the flag V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION in the
        corresponding struct :c:type:`v4l2_subdev_mbus_code_enum`
-       during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`.
-
+       during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`. Zero for
+       metadata mbus codes.
     * - __u16
       - ``xfer_func``
       - Transfer function, from enum :c:type:`v4l2_xfer_func`.
@@ -104,7 +104,8 @@ Media Bus Formats
        The driver indicates that the transfer function conversion is supported by
        setting the flag V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC in the
        corresponding struct :c:type:`v4l2_subdev_mbus_code_enum`
-       during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`.
+       during enumeration. See :ref:`v4l2-subdev-mbus-code-flags`. Zero for
+       metadata mbus codes.
     * - __u16
       - ``flags``
       - flags See:  :ref:v4l2-mbus-framefmt-flags
index 6b07b73473b5ffcb84ea13278267b264cc4eb8fc..946520bc49f10cff848205bd55615c56ffc306ca 100644 (file)
  * @width:     image width
  * @height:    image height
  * @code:      data format code (from enum v4l2_mbus_pixelcode)
- * @field:     used interlacing type (from enum v4l2_field)
- * @colorspace:        colorspace of the data (from enum v4l2_colorspace)
- * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding)
- * @hsv_enc:   HSV encoding of the data (from enum v4l2_hsv_encoding)
- * @quantization: quantization of the data (from enum v4l2_quantization)
- * @xfer_func:  transfer function of the data (from enum v4l2_xfer_func)
+ * @field:     used interlacing type (from enum v4l2_field), zero for metadata
+ *             mbus codes
+ * @colorspace:        colorspace of the data (from enum v4l2_colorspace), zero on
+ *             metadata mbus codes
+ * @ycbcr_enc: YCbCr encoding of the data (from enum v4l2_ycbcr_encoding), zero
+ *             for metadata mbus codes
+ * @hsv_enc:   HSV encoding of the data (from enum v4l2_hsv_encoding), zero for
+ *             metadata mbus codes
+ * @quantization: quantization of the data (from enum v4l2_quantization), zero
+ *             for metadata mbus codes
+ * @xfer_func:  transfer function of the data (from enum v4l2_xfer_func), zero
+ *             for metadata mbus codes
  * @flags:     flags (V4L2_MBUS_FRAMEFMT_*)
  * @reserved:  reserved bytes that can be later used
  */