mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
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:
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user