[PATCH 3/3] drm: add enum drm_hdr_metadata_eotf

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

 



Avoids hardcoding magic numbers in user-space, and makes the docs
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 | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index c0c40dc9e2f1..eb2a38c73ae0 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -859,6 +859,31 @@ enum drm_hdr_metadata_type {
 	DRM_HDR_STATIC_METADATA_TYPE1 = 0,
 };
 
+/**
+ * enum drm_hdr_metadata_eotf - Electro-Optical Transfer Function.
+ */
+enum drm_hdr_metadata_eotf {
+	/**
+	 * @DRM_HDR_METADATA_EOTF_TRADITIONAL_GAMMA_SDR: traditional gamma, SDR
+	 * luminance range.
+	 */
+	DRM_HDR_METADATA_EOTF_TRADITIONAL_GAMMA_SDR = 0,
+	/**
+	 * @DRM_HDR_METADATA_EOTF_TRADITIONAL_GAMMA_HDR: traditional gamma, HDR
+	 * luminance range.
+	 */
+	DRM_HDR_METADATA_EOTF_TRADITIONAL_GAMMA_HDR = 1,
+	/**
+	 * @DRM_HDR_METADATA_EOTF_SMPTE_ST_2084: SMPTE ST 2084.
+	 */
+	DRM_HDR_METADATA_EOTF_SMPTE_ST_2084 = 2,
+	/**
+	 * @DRM_HDR_METADATA_EOTF_HLG_BT2100: Hybrid Log-Gamma (HLG) based on
+	 * ITU-R BT.2100-0.
+	 */
+	DRM_HDR_METADATA_EOTF_HLG_BT2100 = 3,
+};
+
 /**
  * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data.
  *
@@ -871,7 +896,7 @@ enum drm_hdr_metadata_type {
 struct hdr_metadata_infoframe {
 	/**
 	 * @eotf: Electro-Optical Transfer Function (EOTF)
-	 * used in the stream.
+	 * used in the stream. See enum drm_hdr_metadata_eotf.
 	 */
 	__u8 eotf;
 	/**
-- 
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