diff options
author | Eric Nelson <eric.nelson@boundarydevices.com> | 2014-01-08 17:38:58 -0700 |
---|---|---|
committer | Philippe Schenker <philippe.schenker@toradex.com> | 2020-08-13 16:04:32 +0200 |
commit | f8b16532e514faaaf7b3d15395db31d15095a557 (patch) | |
tree | 7c96b29cf87bcc6c1d2ad420c20591cb00c3666d | |
parent | 937bc90a30f77ab2dde2809af87a9c397d90469d (diff) |
mxc_hdmi: default to keep-alive (don't detect disconnect)
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
(cherry picked from commit db1100f05d89ef2d90c856dfe742e9748d25df10)
(cherry picked from commit de5231fc1c395c1b63f5aa81b818fc5fd5377568)
(cherry picked from commit d8572b76f1baa196e60a681bf1627fbc09d0ed23)
-rw-r--r-- | drivers/video/fbdev/mxc/mxc_hdmi.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/video/fbdev/mxc/mxc_hdmi.c b/drivers/video/fbdev/mxc/mxc_hdmi.c index 7f7e092b7e5a..e39c98265899 100644 --- a/drivers/video/fbdev/mxc/mxc_hdmi.c +++ b/drivers/video/fbdev/mxc/mxc_hdmi.c @@ -944,6 +944,9 @@ static u8 hdmi_edid_i2c_read(struct mxc_hdmi *hdmi, return data; } +static int keepalive=1; +module_param(keepalive, int, 0644); +MODULE_PARM_DESC(keepalive, "Allow only CEA modes"); /* "Power-down enable (active low)" * That mean that power up == 1! */ @@ -2012,6 +2015,7 @@ static void hotplug_worker(struct work_struct *work) u32 hdmi_phy_stat0, hdmi_phy_pol0, hdmi_phy_mask0; unsigned long flags; char event_string[32]; + int isalive = 0; char *envp[] = { event_string, NULL }; @@ -2038,7 +2042,10 @@ static void hotplug_worker(struct work_struct *work) #ifdef CONFIG_MXC_HDMI_CEC mxc_hdmi_cec_handle(0x80); #endif - } else { + if (keepalive) + hdmi_writeb(HDMI_DVI_STAT, HDMI_PHY_POL0); + isalive=1; + } else if (!keepalive) { /* Plugout event */ dev_dbg(&hdmi->pdev->dev, "EVENT=plugout\n"); hdmi_set_cable_state(0); @@ -2057,16 +2064,18 @@ static void hotplug_worker(struct work_struct *work) * completed before next interrupt processed */ spin_lock_irqsave(&hdmi->irq_lock, flags); - /* Re-enable HPD interrupts */ - hdmi_phy_mask0 = hdmi_readb(HDMI_PHY_MASK0); - hdmi_phy_mask0 &= ~HDMI_DVI_STAT; - hdmi_writeb(hdmi_phy_mask0, HDMI_PHY_MASK0); + if (!(keepalive || isalive)) { + /* Re-enable HPD interrupts */ + hdmi_phy_mask0 = hdmi_readb(HDMI_PHY_MASK0); + hdmi_phy_mask0 &= ~HDMI_DVI_STAT; + hdmi_writeb(hdmi_phy_mask0, HDMI_PHY_MASK0); - /* Unmute interrupts */ - hdmi_writeb(~HDMI_DVI_IH_STAT, HDMI_IH_MUTE_PHY_STAT0); + /* Unmute interrupts */ + hdmi_writeb(~HDMI_DVI_IH_STAT, HDMI_IH_MUTE_PHY_STAT0); - if (hdmi_readb(HDMI_IH_FC_STAT2) & HDMI_IH_FC_STAT2_OVERFLOW_MASK) - mxc_hdmi_clear_overflow(hdmi); + if (hdmi_readb(HDMI_IH_FC_STAT2) & HDMI_IH_FC_STAT2_OVERFLOW_MASK) + mxc_hdmi_clear_overflow(hdmi); + } spin_unlock_irqrestore(&hdmi->irq_lock, flags); } |