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

Simon Ser contact at emersion.fr
Fri Apr 28 10:01:29 UTC 2023


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,
+};
+
 /**
  * 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;
 	/**
-- 
2.40.1




More information about the dri-devel mailing list