@@ -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;
/**
Avoids hardcoding magic numbers in user-space, and makes the docs clearer. Signed-off-by: Simon Ser <contact@emersion.fr> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Sebastian Wick <sebastian.wick@redhat.com> Cc: Joshua Ashton <joshua@froggi.es> Cc: Pekka Paalanen <pekka.paalanen@collabora.com> --- include/uapi/drm/drm_mode.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)