Re: [PATCH v9 05/46] media: uapi: Document which mbus format fields are valid for metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sakari,

Thank you for the patch.

On Tue, Apr 16, 2024 at 10:32:38PM +0300, Sakari Ailus wrote:
> 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@xxxxxxxxxxxxxxx>
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
> ---
>  .../userspace-api/media/v4l/subdev-formats.rst | 15 ++++++++-------
>  include/uapi/linux/v4l2-mediabus.h             | 18 ++++++++++++------
>  2 files changed, 20 insertions(+), 13 deletions(-)
> 
> diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> index d9a5ee954cdd..0547f2733ee3 100644
> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> @@ -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 on metadata mbus codes.

I would write "Zero for" instead of "Zero on".

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

>      * - __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 on 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 on 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 on 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 on
> +	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 on
> +	metadata mbus codes.
>      * - __u16
>        - ``flags``
>        - flags See:  :ref:v4l2-mbus-framefmt-flags
> diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
> index 6b07b73473b5..de1d6161bf62 100644
> --- a/include/uapi/linux/v4l2-mediabus.h
> +++ b/include/uapi/linux/v4l2-mediabus.h
> @@ -19,12 +19,18 @@
>   * @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 on 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
> + *		on metadata mbus codes
> + * @hsv_enc:	HSV encoding of the data (from enum v4l2_hsv_encoding), zero on
> + *		metadata mbus codes
> + * @quantization: quantization of the data (from enum v4l2_quantization), zero
> + *		on metadata mbus codes
> + * @xfer_func:  transfer function of the data (from enum v4l2_xfer_func), zero
> + *		on metadata mbus codes
>   * @flags:	flags (V4L2_MBUS_FRAMEFMT_*)
>   * @reserved:  reserved bytes that can be later used
>   */

-- 
Regards,

Laurent Pinchart




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux