From: yicheng shen Date: Thu, 13 Dec 2018 09:12:07 +0000 (-0500) Subject: hdmirx: fix dvi issue when resume [1/1] X-Git-Tag: hardkernel-4.9.236-104~1992 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6728638fb5e80c9b0a52bf7c602f31dc2a53ddac;p=platform%2Fkernel%2Flinux-amlogic.git hdmirx: fix dvi issue when resume [1/1] PD#SWPL-2641 Problem: SDA of I2C was pulled down,the box cant read EDID and then send DVI. Solution: Add rxsense pulse to avoid mtk box sda low issue. Verify: Local Change-Id: I0d3dc4b0c3b956663be1d3e383094e456f3d4e7d Signed-off-by: yicheng shen --- diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.c index 47ff362..da115d9 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.c @@ -1691,7 +1691,7 @@ static void rx_phy_suspend(void) if (hdmi_cec_en != 0) { if (suspend_pddq_sel == 2) { /* set rxsense pulse */ - rx_phy_rxsense_pulse(10, 10); + rx_phy_rxsense_pulse(10, 10, 0); } } /* phy powerdown */ @@ -1707,7 +1707,7 @@ static void rx_phy_resume(void) * rxsense pulse and phy_int shottern than * 50ms, SDA may be pulled low 800ms on MTK box */ - rx_phy_rxsense_pulse(20, 50); + rx_phy_rxsense_pulse(20, 50, 1); } } hdmirx_phy_init(); diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h index 7dc3559a..99dc5aa 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h @@ -34,7 +34,7 @@ #include "hdmi_rx_edid.h" -#define RX_VER0 "ver.2018-11-30" +#define RX_VER0 "ver.2018-12-13" /* * * diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c index 8c6f8cb..cdffc70 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c @@ -3561,12 +3561,12 @@ unsigned int aml_phy_tmds_valid(void) } } -void rx_phy_rxsense_pulse(unsigned int t1, unsigned int t2) +void rx_phy_rxsense_pulse(unsigned int t1, unsigned int t2, bool en) { /* set rxsense pulse */ - hdmirx_phy_pddq(1); + hdmirx_phy_pddq(!en); mdelay(t1); - hdmirx_phy_pddq(0); + hdmirx_phy_pddq(en); mdelay(t2); } diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.h index aeee4db..eb4e549 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.h @@ -1204,7 +1204,7 @@ extern void rx_force_rxsense_cfg(uint8_t level); extern void rx_force_hpd_rxsense_cfg(uint8_t level); extern void rx_audio_bandgap_rst(void); extern void rx_audio_bandgap_rst(void); -extern void rx_phy_rxsense_pulse(unsigned int t1, unsigned int t2); +extern void rx_phy_rxsense_pulse(unsigned int t1, unsigned int t2, bool en); extern void rx_phy_power_on(unsigned int onoff);