summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>2018-03-22 17:08:10 -0500
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit6cf5d0003bbd92f524d520ed46f5069b455a5d8e (patch)
treeb1432e7b6d7d1bfbe4b01150782a9e1b0285624b
parentf1be2b26669c7100a021a42497fb5b56c3fba27e (diff)
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>
-rw-r--r--drivers/gpu/drm/drm_edid.c6
-rw-r--r--include/linux/hdmi.h5
-rw-r--r--include/uapi/drm/drm_mode.h5
3 files changed, 5 insertions, 11 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 1da4567737be..75789b67803c 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3744,11 +3744,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) {
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index a8095e1d62b5..e367de96076b 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -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);
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 2213980ea0fc..eab8f82d4952 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -531,8 +531,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;
@@ -541,7 +541,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