From c0d4c5b3b3fb036037eabbfbc264e9608abda30a Mon Sep 17 00:00:00 2001 From: Yi Zhou Date: Mon, 27 Nov 2017 10:39:52 +0800 Subject: [PATCH] tx: fix the system crash PD#152848: fix the system crash When box authenticate with TV under hdcp 2.2, the hdcp 2.2 must be reset in syspend function. Change-Id: I0c85070893b7a2e17606b05c2df068a8ceb8f774 Signed-off-by: Yi Zhou --- drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c | 3 +++ drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 a36bd89dda6b..13e4c1727126 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 @@ -3419,6 +3419,9 @@ static int amhdmitx_remove(struct platform_device *pdev) static int amhdmitx_suspend(struct platform_device *pdev, pm_message_t state) { + hdmitx_device.HWOp.CntlDDC(&hdmitx_device, + DDC_RESET_HDCP, 0); + pr_info("amhdmitx: suspend and reset hdcp\n"); return 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 f684d4f446b0..a39b26ae0a36 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 @@ -3466,7 +3466,10 @@ static int hdmitx_cntl_ddc(struct hdmitx_dev *hdev, unsigned int cmd, hdmitx_wr_reg(HDMITX_DWC_I2CM_READ_BUFF0 + i, 0); break; case DDC_RESET_HDCP: - + hdmitx_set_reg_bits(HDMITX_TOP_SW_RESET, 1, 5, 1); + udelay(10); + hdmitx_set_reg_bits(HDMITX_TOP_SW_RESET, 0, 5, 1); + udelay(10); break; case DDC_HDCP_MUX_INIT: if (argv == 2) {