From 8262fd82367080120d4c3a0f61040df46d423085 Mon Sep 17 00:00:00 2001 From: Zongdong Jiao Date: Sat, 22 Jun 2019 18:48:11 +0800 Subject: [PATCH] hdmitx: optimise the sup_2160p60hz of DV [1/1] PD#SWPL-10065 Problem: TV claims that supporting DV version2, but it lacks the Max_TMDS_Clock2 600MHz Solution: if max tmds clock is less than 600MHz, clear sup_2160p60hz Verify: G12/U212 Change-Id: I77c024dfa860bca60020db689c2a07ae8f502528 Signed-off-by: Zongdong Jiao --- drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c | 8 ++++++++ drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c index b717c52..858e34b1 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c @@ -2194,6 +2194,7 @@ int hdmitx_edid_parse(struct hdmitx_dev *hdmitx_device) int i, j, ret_val; int idx[4]; struct rx_cap *pRXCap = &(hdmitx_device->RXCap); + struct dv_info *dv = &(hdmitx_device->RXCap.dv_info); struct vinfo_s *info = NULL; if (check_dvi_hdmi_edid_valid(hdmitx_device->EDID_buf)) { @@ -2415,6 +2416,13 @@ int hdmitx_edid_parse(struct hdmitx_dev *hdmitx_device) rxlatency_to_vinfo(info, pRXCap); } } + /* if sup_2160p60hz of dv is true, check the MAX_TMDS*/ + if (dv->sup_2160p60hz) { + if (pRXCap->Max_TMDS_Clock2 * 5 < 590) { + dv->sup_2160p60hz = 0; + pr_info(EDID "clear sup_2160p60hz\n"); + } + } return 0; } diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c index 37113f1..2583426 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c @@ -2826,8 +2826,8 @@ static ssize_t show_dv_cap(struct device *dev, if (dv->ver == 2) { pos += snprintf(buf + pos, PAGE_SIZE, "VSVDB Version: V%d\n", dv->ver); - pos += snprintf(buf + pos, PAGE_SIZE, - "2160p60hz: 1\n"); + pos += snprintf(buf + pos, PAGE_SIZE, "2160p%shz: 1\n", + dv->sup_2160p60hz ? "60" : "30"); pos += snprintf(buf + pos, PAGE_SIZE, "Support mode:\n"); if ((dv->Interface != 0x00) && (dv->Interface != 0x01)) { -- 2.7.4