summaryrefslogtreecommitdiff
authorYong Qin <yong.qin@amlogic.com>2020-03-09 06:07:09 (GMT)
committer Shen Liu <shen.liu@amlogic.com>2020-07-22 12:43:32 (GMT)
commit169ca03cc93b1c9dbd67ad590767bd8387372070 (patch)
tree7158a540f3f237e344f7906e836a42d803766061
parent66a94b3c93135a8b09e10bbb5ba06ff8eeb2889f (diff)
downloadcommon-169ca03cc93b1c9dbd67ad590767bd8387372070.zip
common-169ca03cc93b1c9dbd67ad590767bd8387372070.tar.gz
common-169ca03cc93b1c9dbd67ad590767bd8387372070.tar.bz2
cec: decrease cec read blocking time when no cec msg [1/1]
PD#SWPL-22371 Problem: cec read blocking 4s when no msg in. sometime will cause watchdog reset. Solution: de-crease the time. Verify: g12a Signed-off-by: Yong Qin <yong.qin@amlogic.com> Change-Id: I18c83b8fd7c4cacc07c4d0ee1ca2ecdf179492e9
Diffstat
-rw-r--r--drivers/amlogic/cec/hdmi_ao_cec.c6
-rw-r--r--drivers/amlogic/cec/hdmi_ao_cec.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c
index 3c0af63..3cdc01f 100644
--- a/drivers/amlogic/cec/hdmi_ao_cec.c
+++ b/drivers/amlogic/cec/hdmi_ao_cec.c
@@ -64,7 +64,7 @@ static struct early_suspend aocec_suspend_handler;
#include "hdmi_ao_cec.h"
-#define CEC_FRAME_DELAY msecs_to_jiffies(400)
+/*#define CEC_FRAME_DELAY msecs_to_jiffies(400)*/
#define CEC_DEV_NAME "cec"
#define CEC_POWER_ON (0 << 0)
@@ -1200,7 +1200,7 @@ static int check_confilct(void)
{
int i;
- for (i = 0; i < 200; i++) {
+ for (i = 0; i < CEC_CHK_BUS_CNT; i++) {
/*
* sleep 20ms and using hrtimer to check cec line every 1ms
*/
@@ -1212,7 +1212,7 @@ static int check_confilct(void)
break;
CEC_INFO("line busy:%d\n", cec_line_cnt);
}
- if (i >= 200)
+ if (i >= CEC_CHK_BUS_CNT)
return -EBUSY;
else
return 0;
diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h
index aafc7d9..bbb9245 100644
--- a/drivers/amlogic/cec/hdmi_ao_cec.h
+++ b/drivers/amlogic/cec/hdmi_ao_cec.h
@@ -18,10 +18,11 @@
#ifndef __AO_CEC_H__
#define __AO_CEC_H__
+#define CEC_DRIVER_VERSION "2020/03/16:reduece no msg in sleep time\n"
-#define CEC_DRIVER_VERSION "Ver 2019/1/7\n"
+#define CEC_FRAME_DELAY msecs_to_jiffies(30)
+#define CEC_CHK_BUS_CNT 20
-#define CEC_FRAME_DELAY msecs_to_jiffies(400)
#define CEC_DEV_NAME "cec"
#define CEC_EARLY_SUSPEND (1 << 0)