cec: remove the delay time when get phy addr [1/1]

PD#OTT-6364

Problem:
When no hdmi cable connect, framework call get phy address,
will case 2s delay.

Solution:
1.If there is no HPD,needn't waitting TX finished reading the EDID
2.Reduce time out sleep time.

Verify:
W400

Change-Id: I2749e877e8b214355094390364e3711e6f1bbf12
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
This commit is contained in:
Yong Qin
2019-09-27 09:54:34 +08:00
committed by Tao Zeng
parent edb3ac2382
commit 66ae13d7c1
2 changed files with 8 additions and 6 deletions

View File

@@ -1478,11 +1478,13 @@ static bool check_physical_addr_valid(int timeout)
if (phy_addr_test)
break;
/* physical address for box */
if (cec_dev->tx_dev->hdmi_info.vsdb_phy_addr.valid == 0) {
msleep(100);
if (cec_dev->tx_dev->hpd_state &&
(cec_dev->tx_dev->hdmi_info.vsdb_phy_addr.valid == 0)) {
msleep(40);
timeout--;
} else
} else {
break;
}
}
if (timeout <= 0)
return false;
@@ -3086,7 +3088,7 @@ static long hdmitx_cec_ioctl(struct file *f,
mutex_lock(&cec_dev->cec_ioctl_mutex);
switch (cmd) {
case CEC_IOC_GET_PHYSICAL_ADDR:
check_physical_addr_valid(20);
/*check_physical_addr_valid(20);*/
/* physical address for TV or repeator */
tx_dev = cec_dev->tx_dev;
if (!tx_dev || cec_dev->dev_type == CEC_TV_ADDR) {
@@ -3307,7 +3309,7 @@ static long hdmitx_cec_ioctl(struct file *f,
break;
default:
CEC_ERR("error ioctrl\n");
CEC_ERR("error ioctrl: 0x%x\n", cmd);
break;
}
mutex_unlock(&cec_dev->cec_ioctl_mutex);

View File

@@ -18,7 +18,7 @@
#ifndef __AO_CEC_H__
#define __AO_CEC_H__
#define CEC_DRIVER_VERSION "2019/10/11:add freeze mode wake up func-2\n"
#define CEC_DRIVER_VERSION "2019/10/16: reduce box get phy addr timeout time\n"
#define CEC_FRAME_DELAY msecs_to_jiffies(400)
#define CEC_DEV_NAME "cec"