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

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

 



This avoids hard-coding magic values in user-space, and makes our
documentation clearer.

Signed-off-by: Simon Ser <contact@xxxxxxxxxxx>
Cc: Harry Wentland <harry.wentland@xxxxxxx>
Cc: Daniel Vetter <daniel@xxxxxxxx>
Cc: Sebastian Wick <sebastian.wick@xxxxxxxxxx>
Cc: Joshua Ashton <joshua@xxxxxxxxx>
Cc: Pekka Paalanen <pekka.paalanen@xxxxxxxxxxxxx>
---
 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






[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux