author | Zongdong Jiao <zongdong.jiao@amlogic.com> | 2018-11-13 11:41:21 (GMT) |
---|---|---|
committer | Zongdong Jiao <zongdong.jiao@amlogic.com> | 2018-11-13 11:41:21 (GMT) |
commit | 307d1fbded12b652d1cd43d16ef26d1a435bd99c (patch) | |
tree | 4de608934e3c184b3b3ccb83a4636b9ef40550ae | |
parent | c5e7cfe2946db5a9f5154eba016874168a54dbb9 (diff) | |
download | common-307d1fbded12b652d1cd43d16ef26d1a435bd99c.zip common-307d1fbded12b652d1cd43d16ef26d1a435bd99c.tar.gz common-307d1fbded12b652d1cd43d16ef26d1a435bd99c.tar.bz2 |
hdmitx: optimise the i2c reactive position [1/1]
PD#TBD
Problem:
R321 uses the I2C HW to read EDID, not GPIO. So there exists potential I2C hungup
issue.
Solution:
Set I2C_REACTIVE ahead.
Verify:
ATOM
Change-Id: Ifc6f0e75d3426634462a95e0f025c165cfb4c15f
Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
-rw-r--r-- | drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 2 | ||||
-rw-r--r-- | drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c | 2 |
2 files changed, 3 insertions, 1 deletions
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 9dc4e91..a51512c7 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 @@ -3073,6 +3073,7 @@ static void hdmitx_hpd_plugin_handler(struct work_struct *work) } mutex_lock(&setclk_mutex); pr_info(SYS "plugin\n"); + hdev->HWOp.CntlMisc(hdev, MISC_I2C_REACTIVE, 0); hdev->hdmitx_event &= ~HDMI_TX_HPD_PLUGIN; /* start reading E-EDID */ rx_repeat_hpd_state(1); @@ -3085,7 +3086,6 @@ static void hdmitx_hpd_plugin_handler(struct work_struct *work) hdev->HWOp.CntlConfig(hdev, CONF_HDMI_DVI_MODE, HDMI_MODE); mutex_lock(&getedid_mutex); - hdev->HWOp.CntlMisc(hdev, MISC_I2C_REACTIVE, 0); mutex_unlock(&getedid_mutex); if (hdev->repeater_tx) { if (check_fbc_special(&hdev->EDID_buf[0]) diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c index 06ed112..0dc6fac 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c @@ -3727,12 +3727,14 @@ static int hdmitx_cntl_misc(struct hdmitx_dev *hdev, unsigned int cmd, hdmitx_set_reg_bits(HDMITX_DWC_MC_CLKDIS, !!argv, 6, 1); break; case MISC_I2C_REACTIVE: + hdmitx_hdcp_opr(4); hdmitx_set_reg_bits(HDMITX_DWC_A_HDCPCFG1, 0, 0, 1); hdmitx_set_reg_bits(HDMITX_DWC_HDCP22REG_CTRL, 0, 2, 1); hdmitx_wr_reg(HDMITX_DWC_I2CM_SS_SCL_HCNT_1, 0xff); hdmitx_wr_reg(HDMITX_DWC_I2CM_SS_SCL_HCNT_0, 0xf6); edid_read_head_8bytes(); hdmi_hwi_init(hdev); + mdelay(5); break; default: break; |