msm: display: HDMI: ISR not triggered when HPD occurs during power_off
During power off we disable 5v, power down core, by turning off the
TX channels one by one. When a HPD is triggered the driver has a
software debouncing timer during which interrupts are disabled to
be able to read stable HPD status from the register. When HPD is
detected while the core is being turned off/powered down the driver's
software disables the interrupt and this was making the core to go
into off state. So the fix was to keep the interrupt bit enabled through
the register even during the debounce timeout (this doesn't trigger
unnecessary interrupts due to appropriate clearing and masking of HPD
interrupt bits).
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
diff --git a/drivers/video/msm/hdmi_msm.c b/drivers/video/msm/hdmi_msm.c
index ffc852f..2e71c26 100644
--- a/drivers/video/msm/hdmi_msm.c
+++ b/drivers/video/msm/hdmi_msm.c
@@ -420,8 +420,11 @@
boolean cable_detected = (hpd_int_status & 2) >> 1;
/* HDMI_HPD_INT_CTRL[0x0254] */
- /* Clear all interrupts, timer will turn IRQ back on */
- HDMI_OUTP(0x0254, 1 << 0);
+ /* Clear all interrupts, timer will turn IRQ back on
+ * Leaving the bit[2] on, else core goes off
+ * on getting HPD during power off
+ */
+ HDMI_OUTP(0x0254, (1 << 2) | (1 << 0));
DEV_DBG("%s: HPD IRQ, Ctrl=%04x, State=%04x\n", __func__,
hpd_int_ctrl, hpd_int_status);