From 15c18af09ee0ae0271102bc2485287258548157d Mon Sep 17 00:00:00 2001 From: yicheng shen Date: Thu, 9 May 2019 21:10:33 +0800 Subject: [PATCH] hdmirx: add hdcp2.2 test key detection [1/3] PD#SWPL-8312 Problem: hdmi can not detect the hdcp2.2 aml_test_key; Solution: Add aml_test_key detection function; Verify: TL1: kernel 4.9 TXLX: kernel 3.14 Change-Id: I126e6f94f8b9f8479619b3cfddf22306e8c8ac15 Signed-off-by: yicheng shen --- drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h | 2 +- drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) 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 ad8c8ce..6bae781 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h @@ -41,7 +41,7 @@ * * */ -#define RX_VER1 "ver.2019/05/06" +#define RX_VER1 "ver.2019/05/09" /* * * 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 31106c0..d892c93 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c @@ -1769,10 +1769,14 @@ void hdmirx_hdcp22_esm_rst(void) int rx_is_hdcp22_support(void) { int ret = 0; + int temp; - if (rx_sec_set_duk(hdmirx_repeat_support()) == 1) { + temp = rx_sec_set_duk(hdmirx_repeat_support()); + if (temp) { rx_hdcp22_wr_top(TOP_SKP_CNTL_STAT, 7); ret = 1; + if (temp == 2) + rx_pr("2.2 test key!!!\n"); } else ret = 0; rx_pr("hdcp22 == %d\n", ret); @@ -2359,7 +2363,7 @@ void hdmirx_load_firm_reset(int type) downstream_hpd_flag = 0; ret = rx_sec_set_duk(hdmirx_repeat_support()); rx_pr("ret = %d\n", ret); - if (ret == 1) { + if (ret) { hdmirx_wr_dwc(DWC_HDCP22_CONTROL, 0x0); hdmirx_hdcp22_esm_rst(); mdelay(100); @@ -3004,7 +3008,7 @@ void rx_debug_load22key(void) ret = rx_sec_set_duk(hdmirx_repeat_support()); rx_pr("22 = %d\n", ret); - if (ret == 1) { + if (ret) { rx_pr("load 2.2 key\n"); sm_pause = 1; rx_set_cur_hpd(0); -- 2.7.4