libdrm: add HDR10 metadata struct and 10bit YUV420 fourcc declartion
Upstream-Status: Inappropriate [i.MX specific]
Signed-off-by: Haihua Hu <jared.hu@nxp.com>
diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
index e17eab3..4d698d7 100644
--- a/include/drm/drm_fourcc.h
+++ b/include/drm/drm_fourcc.h
@@ -144,6 +144,7 @@
#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */
#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */
+#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane, 10-bit per channel */
/*
* 3 plane YCbCr
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index 6ff6185..771bc38 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -582,6 +582,28 @@
__u16 reserved;
};
+enum supported_eotf_type {
+ TRADITIONAL_GAMMA_SDR = 0,
+ TRADITIONA_GAMMA_HDR,
+ SMPTE_ST2084,
+ FUTURE_EOTF
+};
+
+/* HDR Metadata */
+struct hdr_static_metadata {
+ __u16 eotf;
+ __u16 type;
+ __u16 display_primaries_x[3];
+ __u16 display_primaries_y[3];
+ __u16 white_point_x;
+ __u16 white_point_y;
+ __u16 max_mastering_display_luminance;
+ __u16 min_mastering_display_luminance;
+ __u16 max_fall;
+ __u16 max_cll;
+ __u16 min_cll;
+};
+
#define DRM_MODE_PAGE_FLIP_EVENT 0x01
#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4