[PATCH 3/3] drm: add enum drm_hdr_metadata_eotf
Simon Ser
contact at emersion.fr
Fri Apr 28 10:01:34 UTC 2023
Avoids hardcoding magic numbers in user-space, and makes the docs
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 | 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
More information about the dri-devel
mailing list