Skip to content

Commit 4b2891f

Browse files
Eric Nelsonjohnweber
authored andcommitted
mxc_hdmi: default to keep-alive (don't detect disconnect)
Signed-off-by: Eric Nelson <[email protected]> (cherry picked from commit 60709839eda8310d86b778aab8c2c22844e4141c)
1 parent 5dd2f50 commit 4b2891f

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! */
@@ -1981,6 +1984,7 @@ static void hotplug_worker(struct work_struct *work)
19811984
u32 hdmi_phy_stat0, hdmi_phy_pol0, hdmi_phy_mask0;
19821985
unsigned long flags;
19831986
char event_string[32];
1987+
int isalive = 0;
19841988
char *envp[] = { event_string, NULL };
19851989

19861990

@@ -2007,7 +2011,10 @@ static void hotplug_worker(struct work_struct *work)
20072011
#endif
20082012
hdmi_set_cable_state(1);
20092013

2010-
} else {
2014+
if (keepalive)
2015+
hdmi_writeb(HDMI_DVI_STAT, HDMI_PHY_POL0);
2016+
isalive=1;
2017+
} else if (!keepalive) {
20112018
/* Plugout event */
20122019
dev_dbg(&hdmi->pdev->dev, "EVENT=plugout\n");
20132020
hdmi_set_cable_state(0);
@@ -2026,16 +2033,18 @@ static void hotplug_worker(struct work_struct *work)
20262033
* completed before next interrupt processed */
20272034
spin_lock_irqsave(&hdmi->irq_lock, flags);
20282035

2029-
/* Re-enable HPD interrupts */
2030-
hdmi_phy_mask0 = hdmi_readb(HDMI_PHY_MASK0);
2031-
hdmi_phy_mask0 &= ~HDMI_DVI_STAT;
2032-
hdmi_writeb(hdmi_phy_mask0, HDMI_PHY_MASK0);
2036+
if (!(keepalive || isalive)) {
2037+
/* Re-enable HPD interrupts */
2038+
hdmi_phy_mask0 = hdmi_readb(HDMI_PHY_MASK0);
2039+
hdmi_phy_mask0 &= ~HDMI_DVI_STAT;
2040+
hdmi_writeb(hdmi_phy_mask0, HDMI_PHY_MASK0);
20332041

2034-
/* Unmute interrupts */
2035-
hdmi_writeb(~HDMI_DVI_IH_STAT, HDMI_IH_MUTE_PHY_STAT0);
2042+
/* Unmute interrupts */
2043+
hdmi_writeb(~HDMI_DVI_IH_STAT, HDMI_IH_MUTE_PHY_STAT0);
20362044

2037-
if (hdmi_readb(HDMI_IH_FC_STAT2) & HDMI_IH_FC_STAT2_OVERFLOW_MASK)
2038-
mxc_hdmi_clear_overflow(hdmi);
2045+
if (hdmi_readb(HDMI_IH_FC_STAT2) & HDMI_IH_FC_STAT2_OVERFLOW_MASK)
2046+
mxc_hdmi_clear_overflow(hdmi);
2047+
}
20392048

20402049
spin_unlock_irqrestore(&hdmi->irq_lock, flags);
20412050
}

0 commit comments

Comments
 (0)