summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2015-07-14 14:19:48 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-21 14:27:14 +0100
commitee4c0dec087d836246c82d9fc0a7a305b93c6ab2 (patch)
treefa0494f2b472280e4d6920f0e014652d9c5703b4 /drivers/video
parent014b0edb5e056ae0f83924164c3515c0a4902f7b (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 e1a4cb75b98b..8e5c1e30e5e3 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
@@ -942,7 +950,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! */
@@ -2041,7 +2049,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 */
@@ -2062,7 +2070,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;