hdmirx: reduce the cpu occupancy rate of hdcp_rx22 [1/2]
authoryicheng shen <yicheng.shen@amlogic.com>
Fri, 4 Jan 2019 08:06:49 +0000 (03:06 -0500)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 8 Jan 2019 11:42:44 +0000 (03:42 -0800)
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 <yicheng.shen@amlogic.com>
drivers/amlogic/media/vin/tvin/hdmirx/hdcp_rx_main.h
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c

index 1fababd..a57e3f9 100644 (file)
@@ -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)
index 545b187..1515c78 100644 (file)
@@ -46,7 +46,7 @@
  *
  *
  */
-#define RX_VER2 "ver.2018/12/20"
+#define RX_VER2 "ver.2019/01/04"
 
 /*print type*/
 #define        LOG_EN          0x01
index 0567f20..241cbeb 100644 (file)
@@ -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;
+       }
 }
 
 /*