drm/msm/hdmi: rework HDMI IRQ handler
authorJilai Wang <jilaiw@codeaurora.org>
Mon, 1 Dec 2014 20:12:23 +0000 (15:12 -0500)
committerRob Clark <robdclark@gmail.com>
Thu, 18 Dec 2014 19:32:15 +0000 (14:32 -0500)
Disable the HPD interrupt when acking it, to avoid spurious
interrupt.

Signed-off-by: Jilai Wang <jilaiw@codeaurora.org>
drivers/gpu/drm/msm/hdmi/hdmi_connector.c

index 08eaee37a37f175dc486c61ee0a5cb03f6331035..b4e70e0e3cfa603b1ee8bbf393dd07402c96fbbb 100644 (file)
@@ -251,11 +251,11 @@ void hdmi_connector_irq(struct drm_connector *connector)
                        (hpd_int_status & HDMI_HPD_INT_STATUS_INT)) {
                bool detected = !!(hpd_int_status & HDMI_HPD_INT_STATUS_CABLE_DETECTED);
 
-               DBG("status=%04x, ctrl=%04x", hpd_int_status, hpd_int_ctrl);
-
-               /* ack the irq: */
+               /* ack & disable (temporarily) HPD events: */
                hdmi_write(hdmi, REG_HDMI_HPD_INT_CTRL,
-                               hpd_int_ctrl | HDMI_HPD_INT_CTRL_INT_ACK);
+                       HDMI_HPD_INT_CTRL_INT_ACK);
+
+               DBG("status=%04x, ctrl=%04x", hpd_int_status, hpd_int_ctrl);
 
                /* detect disconnect if we are connected or visa versa: */
                hpd_int_ctrl = HDMI_HPD_INT_CTRL_INT_EN;