Skip to content

Commit 5e296a0

Browse files
Eric Nelsonchrillomat
authored andcommitted
mxc_hdmi: default to keep-alive (don't detect disconnect)
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> (cherry picked from commit 60709839eda8310d86b778aab8c2c22844e4141c)
1 parent 162d681 commit 5e296a0

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

drivers/video/mxc/mxc_hdmi.c

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,9 @@ static u8 hdmi_edid_i2c_read(struct mxc_hdmi *hdmi,
941941
return data;
942942
}
943943

944+
static int keepalive=1;
945+
module_param(keepalive, int, 0644);
946+
MODULE_PARM_DESC(keepalive, "Allow only CEA modes");
944947

945948
/* "Power-down enable (active low)"
946949
* That mean that power up == 1! */
@@ -1987,6 +1990,7 @@ static void hotplug_worker(struct work_struct *work)
19871990
u32 hdmi_phy_stat0, hdmi_phy_pol0, hdmi_phy_mask0;
19881991
unsigned long flags;
19891992
char event_string[32];
1993+
int isalive = 0;
19901994
char *envp[] = { event_string, NULL };
19911995

19921996

@@ -2013,7 +2017,10 @@ static void hotplug_worker(struct work_struct *work)
20132017
#endif
20142018
hdmi_set_cable_state(1);
20152019

2016-
} else {
2020+
if (keepalive)
2021+
hdmi_writeb(HDMI_DVI_STAT, HDMI_PHY_POL0);
2022+
isalive=1;
2023+
} else if (!keepalive) {
20172024
/* Plugout event */
20182025
dev_dbg(&hdmi->pdev->dev, "EVENT=plugout\n");
20192026
hdmi_set_cable_state(0);
@@ -2032,16 +2039,18 @@ static void hotplug_worker(struct work_struct *work)
20322039
* completed before next interrupt processed */
20332040
spin_lock_irqsave(&hdmi->irq_lock, flags);
20342041

2035-
/* Re-enable HPD interrupts */
2036-
hdmi_phy_mask0 = hdmi_readb(HDMI_PHY_MASK0);
2037-
hdmi_phy_mask0 &= ~HDMI_DVI_STAT;
2038-
hdmi_writeb(hdmi_phy_mask0, HDMI_PHY_MASK0);
2042+
if (!(keepalive || isalive)) {
2043+
/* Re-enable HPD interrupts */
2044+
hdmi_phy_mask0 = hdmi_readb(HDMI_PHY_MASK0);
2045+
hdmi_phy_mask0 &= ~HDMI_DVI_STAT;
2046+
hdmi_writeb(hdmi_phy_mask0, HDMI_PHY_MASK0);
20392047

2040-
/* Unmute interrupts */
2041-
hdmi_writeb(~HDMI_DVI_IH_STAT, HDMI_IH_MUTE_PHY_STAT0);
2048+
/* Unmute interrupts */
2049+
hdmi_writeb(~HDMI_DVI_IH_STAT, HDMI_IH_MUTE_PHY_STAT0);
20422050

2043-
if (hdmi_readb(HDMI_IH_FC_STAT2) & HDMI_IH_FC_STAT2_OVERFLOW_MASK)
2044-
mxc_hdmi_clear_overflow(hdmi);
2051+
if (hdmi_readb(HDMI_IH_FC_STAT2) & HDMI_IH_FC_STAT2_OVERFLOW_MASK)
2052+
mxc_hdmi_clear_overflow(hdmi);
2053+
}
20452054

20462055
spin_unlock_irqrestore(&hdmi->irq_lock, flags);
20472056
}

0 commit comments

Comments
 (0)