mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
Revert "BACKPORT: drm: Parse HDR metadata info from EDID"
This reverts commit 1e98c11549.
Revert most of this change. We only need the #define.
Bug: 152417756
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: I6978ee67314f64e92e22a051f85863c1a440f9f1
This commit is contained in:
@@ -3938,54 +3938,6 @@ static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)
|
||||
mode->clock = clock;
|
||||
}
|
||||
|
||||
static bool cea_db_is_hdmi_hdr_metadata_block(const u8 *db)
|
||||
{
|
||||
if (cea_db_tag(db) != USE_EXTENDED_TAG)
|
||||
return false;
|
||||
|
||||
if (db[1] != HDR_STATIC_METADATA_BLOCK)
|
||||
return false;
|
||||
|
||||
if (cea_db_payload_len(db) < 3)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static uint8_t eotf_supported(const u8 *edid_ext)
|
||||
{
|
||||
return edid_ext[2] &
|
||||
(BIT(HDMI_EOTF_TRADITIONAL_GAMMA_SDR) |
|
||||
BIT(HDMI_EOTF_TRADITIONAL_GAMMA_HDR) |
|
||||
BIT(HDMI_EOTF_SMPTE_ST2084));
|
||||
}
|
||||
|
||||
static uint8_t hdr_metadata_type(const u8 *edid_ext)
|
||||
{
|
||||
return edid_ext[3] &
|
||||
BIT(HDMI_STATIC_METADATA_TYPE1);
|
||||
}
|
||||
|
||||
static void
|
||||
drm_parse_hdr_metadata_block(struct drm_connector *connector, const u8 *db)
|
||||
{
|
||||
u16 len;
|
||||
|
||||
len = cea_db_payload_len(db);
|
||||
|
||||
connector->hdr_sink_metadata.hdmi_type1.eotf =
|
||||
eotf_supported(db);
|
||||
connector->hdr_sink_metadata.hdmi_type1.metadata_type =
|
||||
hdr_metadata_type(db);
|
||||
|
||||
if (len >= 4)
|
||||
connector->hdr_sink_metadata.hdmi_type1.max_cll = db[4];
|
||||
if (len >= 5)
|
||||
connector->hdr_sink_metadata.hdmi_type1.max_fall = db[5];
|
||||
if (len >= 6)
|
||||
connector->hdr_sink_metadata.hdmi_type1.min_cll = db[6];
|
||||
}
|
||||
|
||||
static void
|
||||
drm_parse_hdmi_vsdb_audio(struct drm_connector *connector, const u8 *db)
|
||||
{
|
||||
@@ -4866,8 +4818,6 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
|
||||
drm_parse_hdmi_forum_vsdb(connector, db);
|
||||
if (cea_db_is_y420cmdb(db))
|
||||
drm_parse_y420cmdb_bitmap(connector, db);
|
||||
if (cea_db_is_hdmi_hdr_metadata_block(db))
|
||||
drm_parse_hdr_metadata_block(connector, db);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user