From: Yong Qin Date: Fri, 27 Sep 2019 01:54:34 +0000 (+0800) Subject: cec: remove the delay time when get phy addr [1/1] X-Git-Tag: hardkernel-4.9.236-104~533 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66ae13d7c18ecd1d66a4bb5d5cfe6ca1aad6ced8;p=platform%2Fkernel%2Flinux-amlogic.git 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 --- 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"