[PATCH 2/3] drm: add define for Static_Metadata_Descriptor_ID

Pekka Paalanen ppaalanen at gmail.com
Fri Apr 28 13:12:18 UTC 2023


On Fri, 28 Apr 2023 10:01:29 +0000
Simon Ser <contact at emersion.fr> wrote:

> This avoids hard-coding magic values in user-space, and makes our
> documentation clearer.
> 
> Signed-off-by: Simon Ser <contact at emersion.fr>
> Cc: Harry Wentland <harry.wentland at amd.com>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: Sebastian Wick <sebastian.wick at redhat.com>
> Cc: Joshua Ashton <joshua at froggi.es>
> Cc: Pekka Paalanen <pekka.paalanen at collabora.com>
> ---
>  include/uapi/drm/drm_mode.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index 997d23fb2d68..c0c40dc9e2f1 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -849,6 +849,16 @@ struct drm_color_lut {
>  	__u16 reserved;
>  };
>  
> +/**
> + * enum drm_hdr_metadata_type - HDR metadata descriptor ID.
> + */
> +enum drm_hdr_metadata_type {
> +	/**
> +	 * @DRM_HDR_STATIC_METADATA_TYPE1: Static Metadata Type 1.
> +	 */
> +	DRM_HDR_STATIC_METADATA_TYPE1 = 0,
> +};

Hi,

the subject says "define" but this is an enum. No big deal, but the
thing I started wondering is how I am going to use these in userspace.
There is no #define I could test to know if I need to provide a
fallback definition. What's the migration plan for userspace to start
using this and patch 3?

Nevertheless, these are good to have.

Oh, is it a libdrm version check I should use?

In that case, patches 2 and 3 are

Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.com>


Thanks,
pq


> +
>  /**
>   * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data.
>   *
> @@ -866,6 +876,7 @@ struct hdr_metadata_infoframe {
>  	__u8 eotf;
>  	/**
>  	 * @metadata_type: Static_Metadata_Descriptor_ID.
> +	 * This must be &DRM_HDR_STATIC_METADATA_TYPE1.
>  	 */
>  	__u8 metadata_type;
>  	/**
> @@ -925,6 +936,7 @@ struct hdr_metadata_infoframe {
>  struct hdr_output_metadata {
>  	/**
>  	 * @metadata_type: Static_Metadata_Descriptor_ID.
> +	 * This must be &DRM_HDR_STATIC_METADATA_TYPE1.
>  	 */
>  	__u32 metadata_type;
>  	/**

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230428/1d22ea6c/attachment.sig>


More information about the dri-devel mailing list