diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-15 17:01:37 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-15 17:01:36 -0800 |
commit | 70d13ef76a14126795c53c619d47ec0e9dd49f2b (patch) | |
tree | 551a43503f41b067bffe662a83b87a69234a3b8d /include | |
parent | b574c4b1dc6cd964fca7330446485fc61e42cb5b (diff) | |
parent | 2f815283c7407af289432810ff3c89278dffca11 (diff) |
Merge "msm: mdss: Add HDR Metadata Interface"
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/msm_mdp_ext.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/include/uapi/linux/msm_mdp_ext.h b/include/uapi/linux/msm_mdp_ext.h index 3bd8bea8ae0d..ee68675bfe13 100644 --- a/include/uapi/linux/msm_mdp_ext.h +++ b/include/uapi/linux/msm_mdp_ext.h @@ -179,6 +179,77 @@ VALIDATE/COMMIT FLAG CONFIGURATION #define OUT_LAYER_COLOR_SPACE +/* From CEA.861.3 */ +#define MDP_HDR_EOTF_SMTPE_ST2084 0x2 +#define MDP_HDR_EOTF_HLG 0x3 + +/* From Vesa DPv1.4 - Pixel Encoding - Table 2-120 */ +#define MDP_PIXEL_ENCODING_RGB 0x0 +#define MDP_PIXEL_ENCODING_YCBCR_444 0x1 +#define MDP_PIXEL_ENCODING_YCBCR_422 0x2 +#define MDP_PIXEL_ENCODING_YCBCR_420 0x3 +#define MDP_PIXEL_ENCODING_Y_ONLY 0x4 +#define MDP_PIXEL_ENCODING_RAW 0x5 + +/* From Vesa DPv1.4 - Colorimetry Formats - Table 2-120 */ +/* RGB - used with MDP_DP_PIXEL_ENCODING_RGB */ +#define MDP_COLORIMETRY_RGB_SRGB 0x0 +#define MDP_COLORIMETRY_RGB_WIDE_FIXED_POINT 0x1 +#define MDP_COLORIMETRY_RGB_WIDE_FLOAT_POINT 0x2 +#define MDP_COLORIMETRY_RGB_ADOBE 0x3 +#define MDP_COLORIMETRY_RGB_DPI_P3 0x4 +#define MDP_COLORIMETRY_RGB_CUSTOM 0x5 +#define MDP_COLORIMETRY_RGB_ITU_R_BT_2020 0x6 + +/* YUV - used with MDP_DP_PIXEL_ENCODING_YCBCR(444 or 422 or 420) */ +#define MDP_COLORIMETRY_YCBCR_ITU_R_BT_601 0x0 +#define MDP_COLORIMETRY_YCBCR_ITU_R_BT_709 0x1 +#define MDP_COLORIMETRY_YCBCR_XV_YCC_601 0x2 +#define MDP_COLORIMETRY_YCBCR_XV_YCC_709 0x3 +#define MDP_COLORIMETRY_YCBCR_S_YCC_601 0x4 +#define MDP_COLORIMETRY_YCBCR_ADOBE_YCC_601 0x5 +#define MDP_COLORIMETRY_YCBCR_ITU_R_BT_2020_YCBCR_CONST 0x6 +#define MDP_COLORIMETRY_YCBCR_ITU_R_BT_2020_YCBCR 0x7 + +/* Dynamic Range - Table 2-120 */ +/* Full range */ +#define MDP_DYNAMIC_RANGE_VESA 0x0 +/* Limited range */ +#define MDP_DYNAMIC_RANGE_CEA 0x1 + +/* Bits per component(bpc) for Pixel encoding format RGB from Table 2-120 */ +#define MDP_RGB_6_BPC 0x0 +#define MDP_RGB_8_BPC 0x1 +#define MDP_RGB_10_BPC 0x2 +#define MDP_RGB_12_BPC 0x3 +#define MDP_RGB_16_BPC 0x4 + +/* + * Bits per component(bpc) for Pixel encoding format YCbCr444, YCbCr422, + * YCbCr420 and Y only + * from Table 2-120 + */ +#define MDP_YUV_8_BPC 0x1 +#define MDP_YUV_10_BPC 0x2 +#define MDP_YUV_12_BPC 0x3 +#define MDP_YUV_16_BPC 0x4 + +/* Bits per component(bpc) for Pixel encoding format RAW from Table 2-120 */ +#define MDP_RAW_6_BPC 0x1 +#define MDP_RAW_7_BPC 0x2 +#define MDP_RAW_8_BPC 0x3 +#define MDP_RAW_10_BPC 0x4 +#define MDP_RAW_12_BPC 0x5 +#define MDP_RAW_14_BPC 0x6 +#define MDP_RAW16_BPC 0x7 + +/* Content Type - Table 2-120 */ +#define MDP_CONTENT_TYPE_NOT_DEFINED 0x0 +#define MDP_CONTENT_TYPE_GRAPHICS 0x1 +#define MDP_CONTENT_TYPE_PHOTO 0x2 +#define MDP_CONTENT_TYPE_VIDEO 0x3 +#define MDP_CONTENT_TYPE_GAME 0x4 + /********************************************************************** Configuration structures All parameters are input to driver unless mentioned output parameter @@ -709,4 +780,27 @@ struct mdp_set_cfg { uint32_t len; uint64_t __user payload; }; + +#define HDR_PRIMARIES_COUNT 3 + +#define MDP_HDR_STREAM + +struct mdp_hdr_stream { + uint32_t eotf; + uint32_t display_primaries_x[HDR_PRIMARIES_COUNT]; + uint32_t display_primaries_y[HDR_PRIMARIES_COUNT]; + uint32_t white_point_x; + uint32_t white_point_y; + uint32_t max_luminance; + uint32_t min_luminance; + uint32_t max_content_light_level; + uint32_t max_average_light_level; + /* DP related */ + uint32_t pixel_encoding; + uint32_t colorimetry; + uint32_t range; + uint32_t bits_per_component; + uint32_t content_type; + uint32_t reserved[5]; +}; #endif |