summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-07-14 14:19:48 +0200
committerPhilippe Schenker <philippe.schenker@toradex.com>2019-05-24 11:34:13 +0200
commit51a94d7dc362933c83f400f4faa2a80d80b02c4a (patch)
tree5e5d49b36fc1447c7a452fc8fe1820134becdd37 /drivers/video
parent5748aeaab9f22240d8acdc07abab3127206e8604 (diff)
mxc_hdmi: fix detect disconnect case
The keepalive module variable allows to not go into a disconnected state. Fix the case when keepalive is set to go to disconnect. Add a precompiler directive which allows to only evaluate the HPD signal for HDMI monitor detection. Default is to react on the status bits for HPD and the TMDS signal line detection to detect an attached monitor. While at it cleanup parameter documentation and whitespace. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit b15fed911e022b383295cb5443872d427e756677) (cherry picked from commit 6bf9ef90b27fea00ae27f719473a5b7fca30a72e) (cherry picked from commit 2d67c557073a6e728cfe5888323b9aed79392b90)
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/mxc/mxc_hdmi.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/video/fbdev/mxc/mxc_hdmi.c b/drivers/video/fbdev/mxc/mxc_hdmi.c
index f7703c27d381..98cf80f65315 100644
--- a/drivers/video/fbdev/mxc/mxc_hdmi.c
+++ b/drivers/video/fbdev/mxc/mxc_hdmi.c
@@ -76,6 +76,14 @@ static bool only_cea;
module_param(only_cea, bool, 0644);
MODULE_PARM_DESC(only_cea, "Allow only CEA modes");
+#if 0
+/* rely solely on the HPD pin for hot plug detection */
+#undef HDMI_DVI_STAT
+#define HDMI_DVI_STAT 2
+
+#undef HDMI_DVI_IH_STAT
+#define HDMI_DVI_IH_STAT 1
+#endif
/*
* We follow a flowchart which is in the "Synopsys DesignWare Courses
* HDMI Transmitter Controller User Guide, 1.30a", section 3.1
@@ -951,7 +959,7 @@ static u8 hdmi_edid_i2c_read(struct mxc_hdmi *hdmi,
static int keepalive=1;
module_param(keepalive, int, 0644);
-MODULE_PARM_DESC(keepalive, "Allow only CEA modes");
+MODULE_PARM_DESC(keepalive, "Keep HDMI alive (don't detect disconnect)");
/* "Power-down enable (active low)"
* That mean that power up == 1! */
@@ -2047,7 +2055,7 @@ static void hotplug_worker(struct work_struct *work)
mxc_hdmi_cec_handle(0x80);
#endif
if (keepalive)
- hdmi_writeb(HDMI_DVI_STAT, HDMI_PHY_POL0);
+ hdmi_writeb(HDMI_DVI_STAT, HDMI_PHY_POL0);
isalive=1;
} else if (!keepalive) {
/* Plugout event */
@@ -2068,7 +2076,7 @@ static void hotplug_worker(struct work_struct *work)
* completed before next interrupt processed */
spin_lock_irqsave(&hdmi->irq_lock, flags);
- if (!(keepalive || isalive)) {
+ if (!(keepalive && isalive)) {
/* Re-enable HPD interrupts */
hdmi_phy_mask0 = hdmi_readb(HDMI_PHY_MASK0);
hdmi_phy_mask0 &= ~HDMI_DVI_STAT;