summaryrefslogtreecommitdiff
authorZongdong Jiao <zongdong.jiao@amlogic.com>2019-04-22 09:20:09 (GMT)
committer Shen Liu <shen.liu@amlogic.com>2020-04-17 03:21:48 (GMT)
commit558396ee7b88abf08e825f04cfe280f86ac5a21d (patch)
treef0a6433b412f78d6d505918fd2a206be89915535
parent2bf1df4cad404488487a536a1466c63d375f342c (diff)
downloadcommon-558396ee7b88abf08e825f04cfe280f86ac5a21d.zip
common-558396ee7b88abf08e825f04cfe280f86ac5a21d.tar.gz
common-558396ee7b88abf08e825f04cfe280f86ac5a21d.tar.bz2
hdmitx: move work_internal_intr to delayed_work [1/1]
PD#SWPL-6894 Problem: Queue work 'work_internal_intr' cause the hdcp22 flicker Solution: Move work_internal_intr to delayed_work Verify: G12/U212 Change-Id: Ib05c82bb66c9ad7396790d5eb237ff486c56c980 Signed-off-by: Zongdong Jiao <zongdong.jiao@amlogic.com>
Diffstat
-rw-r--r--drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c4
-rw-r--r--drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c21
-rw-r--r--include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h2
3 files changed, 15 insertions, 12 deletions
diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
index ddf14f7..74059a5 100644
--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c
@@ -3832,7 +3832,7 @@ static void hdmitx_hpd_plugout_handler(struct work_struct *work)
static void hdmitx_internal_intr_handler(struct work_struct *work)
{
- struct hdmitx_dev *hdev = container_of((struct work_struct *)work,
+ struct hdmitx_dev *hdev = container_of((struct delayed_work *)work,
struct hdmitx_dev, work_internal_intr);
hdev->HWOp.DebugFun(hdev, "dumpintr");
@@ -3885,7 +3885,7 @@ static int hdmi_task_handle(void *data)
hdmitx_hpd_plugin_handler);
INIT_DELAYED_WORK(&hdmitx_device->work_hpd_plugout,
hdmitx_hpd_plugout_handler);
- INIT_WORK(&hdmitx_device->work_internal_intr,
+ INIT_DELAYED_WORK(&hdmitx_device->work_internal_intr,
hdmitx_internal_intr_handler);
/* for rx sense feature */
diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c
index 342cc1e..455ad31 100644
--- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c
+++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hw/hdmi_tx_hw.c
@@ -629,9 +629,8 @@ static irqreturn_t intr_handler(int irq, void *dev)
hdmitx_wr_reg(HDMITX_TOP_INTR_STAT_CLR, ~0);
hdmitx_wr_reg(HDMITX_DWC_HDCP22REG_STAT, 0xff);
- pr_info(SYS "irq %x\n", dat_top);
- if (dat_dwc)
- pr_info(SYS "irq %x\n", dat_dwc);
+ pr_info(SYS "irq %x %x\n", dat_top, dat_dwc);
+
if (hdev->hpd_lock == 1) {
pr_info(HW "HDMI hpd locked\n");
goto next;
@@ -662,7 +661,8 @@ static irqreturn_t intr_handler(int irq, void *dev)
/* internal interrupt */
if (dat_top & (1 << 0)) {
hdev->hdmitx_event |= HDMI_TX_INTERNAL_INTR;
- queue_work(hdev->hdmi_wq, &hdev->work_internal_intr);
+ queue_delayed_work(hdev->hdmi_wq,
+ &hdev->work_internal_intr, HZ / 10);
}
if (dat_top & (1 << 3)) {
unsigned int rd_nonce_mode =
@@ -2681,11 +2681,9 @@ do { \
#define DUMP_HDMITXREG_SECTION(start, end) \
do { \
- if (start > end) { \
- pr_info("Error start = 0x%lx > end = 0x%lx\n", start, end); \
+ if (start > end) \
break; \
- } \
- pr_info("Start = 0x%lx End = 0x%lx\n", start, end); \
+\
for (addr = start; addr < end + 1; addr++) { \
val = hdmitx_rd_reg(addr); \
if (val) \
@@ -2697,7 +2695,12 @@ static void hdmitx_dump_intr(void)
{
unsigned int addr = 0, val = 0;
- DUMP_HDMITXREG_SECTION(HDMITX_DWC_IH_FC_STAT0, HDMITX_DWC_IH_MUTE);
+ DUMP_HDMITXREG_SECTION(HDMITX_DWC_IH_FC_STAT0,
+ HDMITX_DWC_IH_I2CMPHY_STAT0);
+ DUMP_HDMITXREG_SECTION(HDMITX_DWC_IH_DECODE, HDMITX_DWC_IH_DECODE);
+ DUMP_HDMITXREG_SECTION(HDMITX_DWC_IH_MUTE_FC_STAT0,
+ HDMITX_DWC_IH_MUTE_I2CMPHY_STAT0);
+ DUMP_HDMITXREG_SECTION(HDMITX_DWC_IH_MUTE, HDMITX_DWC_IH_MUTE);
}
static void mode420_half_horizontal_para(void)
diff --git a/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h b/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h
index 850ea2b..d5678a5 100644
--- a/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h
+++ b/include/linux/amlogic/media/vout/hdmi_tx/hdmi_tx_module.h
@@ -301,7 +301,7 @@ struct hdmitx_dev {
struct delayed_work work_hpd_plugin;
struct delayed_work work_hpd_plugout;
struct delayed_work work_rxsense;
- struct work_struct work_internal_intr;
+ struct delayed_work work_internal_intr;
struct work_struct work_hdr;
struct delayed_work work_do_hdcp;
#ifdef CONFIG_AML_HDMI_TX_14