MLK-17703-2: drm: change HDR metadata infoframe structure

According to ANSI-CTA-861-G specification:
 * EOTF is 8 bit, not 16;
 * metadata type is 8 bit, not 16;
 * There's no "Minimum Content Light Level"

This patch will change the HDR metadata structures to reflect that. Also, this
will fix problems seen on some TVs that were rejecting HDR metadata because
it's size was too big (more than 26 bytes).

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Sandor Yu <sandor.yu@nxp.com>
This commit is contained in:
Laurentiu Palcu
2018-03-22 17:08:10 -05:00
committed by Jason Liu
parent 8665b1134f
commit 86c84419e5
3 changed files with 5 additions and 11 deletions

View File

@ -3836,11 +3836,7 @@ drm_parse_hdr_metadata_block(struct drm_connector *connector, const u8 *db)
info->hdr_panel_metadata.eotf = eotf_supported(db);
info->hdr_panel_metadata.type = hdr_metadata_type(db);
if (len == 6) {
info->hdr_panel_metadata.max_cll = db[4];
info->hdr_panel_metadata.max_fall = db[5];
info->hdr_panel_metadata.min_cll = db[6];
} else if (len == 5) {
if (len == 5) {
info->hdr_panel_metadata.max_cll = db[4];
info->hdr_panel_metadata.max_fall = db[5];
} else if (len == 4) {

View File

@ -165,8 +165,8 @@ struct hdmi_drm_infoframe {
enum hdmi_infoframe_type type;
unsigned char version;
unsigned char length;
uint16_t eotf;
uint16_t metadata_type;
uint8_t eotf;
uint8_t metadata_type;
uint16_t display_primaries_x[3];
uint16_t display_primaries_y[3];
uint16_t white_point_x;
@ -175,7 +175,6 @@ struct hdmi_drm_infoframe {
uint16_t min_mastering_display_luminance;
uint16_t max_fall;
uint16_t max_cll;
uint16_t min_cll;
};
int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);

View File

@ -599,8 +599,8 @@ enum supported_eotf_type {
/* HDR Metadata */
struct hdr_static_metadata {
uint16_t eotf;
uint16_t type;
uint8_t eotf;
uint8_t type;
uint16_t display_primaries_x[3];
uint16_t display_primaries_y[3];
uint16_t white_point_x;
@ -609,7 +609,6 @@ struct hdr_static_metadata {
uint16_t min_mastering_display_luminance;
uint16_t max_fall;
uint16_t max_cll;
uint16_t min_cll;
};
#define DRM_MODE_PAGE_FLIP_EVENT 0x01