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
This commit is contained in:
Yong Qin
2020-03-09 14:07:09 +08:00
committed by Chris
parent f5b01375bf
commit 0a07e36deb
2 changed files with 7 additions and 5 deletions

View File

@@ -63,7 +63,7 @@
#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 HR_DELAY(n) (ktime_set(0, n * 1000 * 1000))
@@ -1510,7 +1510,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
*/
@@ -1522,7 +1522,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;

View File

@@ -18,9 +18,11 @@
#ifndef __AO_CEC_H__
#define __AO_CEC_H__
#define CEC_DRIVER_VERSION "2019/12/09:sm1 bus check reg define err\n"
#define CEC_DRIVER_VERSION "2020/03/16:reduece no msg in sleep time\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_PHY_PORT_NUM 4