From 00204d1cee0ca8a4e6c5d936045ec4f45863473b Mon Sep 17 00:00:00 2001 From: yicheng shen Date: Fri, 4 Jan 2019 03:06:49 -0500 Subject: [PATCH] hdmirx: reduce the cpu occupancy rate of hdcp_rx22 [1/2] PD#SWPL-3360 Problem: hdcp_rx22 ocupy much of CPU resources. Solution: Optimize the method of hdcp_rx22 polling-rx-status function. Verify: Local Change-Id: If1c54b9cc219e32f349b4f4c555fb3fbd3539491 Signed-off-by: yicheng shen --- drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.h | 2 +- drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h | 2 +- drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c | 11 +++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.h index 1fababd..a57e3f9 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.h @@ -30,7 +30,7 @@ /* need update the version when update firmware */ #define ESM_VERSION "2.4.84.11.D3" -#define HDCP_RX22_VER "New FW T0905" +#define HDCP_RX22_VER "HDCP2.2 RX190104" #define ESM_HL_DRIVER_SUCCESS 0 #define ESM_HL_DRIVER_FAILED (-1) 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 545b187..1515c78 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h @@ -46,7 +46,7 @@ * * */ -#define RX_VER2 "ver.2018/12/20" +#define RX_VER2 "ver.2019/01/04" /*print type*/ #define LOG_EN 0x01 diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c index 0567f20..241cbeb 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c @@ -154,9 +154,9 @@ static bool video_stable_to_esm; MODULE_PARM_DESC(video_stable_to_esm, "\n video_stable_to_esm\n"); module_param(video_stable_to_esm, bool, 0664); -static bool enable_hdcp22_esm_log; +static int enable_hdcp22_esm_log; MODULE_PARM_DESC(enable_hdcp22_esm_log, "\n enable_hdcp22_esm_log\n"); -module_param(enable_hdcp22_esm_log, bool, 0664); +module_param(enable_hdcp22_esm_log, int, 0664); static bool esm_error_flag; MODULE_PARM_DESC(esm_error_flag, "\n esm_error_flag\n"); @@ -1917,6 +1917,13 @@ void rx_5v_monitor(void) } } rx.cur_5v_sts = (pwr_sts >> rx.port) & 1; + /* inform hdcp_rx22 the 5v sts of rx */ + if (hdcp22_on) { + if (!pwr_sts) + hdcp_mode_sel = true; + else + hdcp_mode_sel = false; + } } /* -- 2.7.4