summaryrefslogtreecommitdiff
authorYong Qin <yong.qin@amlogic.com>2019-09-27 01:54:34 (GMT)
committer zihuan.ling <zihuan.ling@amlogic.com>2019-10-17 06:06:14 (GMT)
commit76926c4cb8e3c6f627e5843ff968e404be69afaf (patch)
tree348f5c7ad6f46762d8d59825b665079ce5389c9f
parent2c5bbf780f8b55af0c9185288220af71b3ed70f9 (diff)
downloadcommon-76926c4cb8e3c6f627e5843ff968e404be69afaf.zip
common-76926c4cb8e3c6f627e5843ff968e404be69afaf.tar.gz
common-76926c4cb8e3c6f627e5843ff968e404be69afaf.tar.bz2
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>
Diffstat
-rw-r--r--drivers/amlogic/cec/hdmi_ao_cec.c12
-rw-r--r--drivers/amlogic/cec/hdmi_ao_cec.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c
index 949c650..fd7384e 100644
--- a/drivers/amlogic/cec/hdmi_ao_cec.c
+++ b/drivers/amlogic/cec/hdmi_ao_cec.c
@@ -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);
diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h
index e838fbf..2d85d73 100644
--- a/drivers/amlogic/cec/hdmi_ao_cec.h
+++ b/drivers/amlogic/cec/hdmi_ao_cec.h
@@ -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"