[PATCH v8 27/29] drm/msm/dp: ignore IRQ HPD latched together with an unplug

From: Yongxing Mou

Date: Tue Nov 10 2026 - 00:00:59 EST


IRQ HPD can be reported with a plug or unplug event.

For unplug + IRQ HPD, ignore the IRQ because the link is being torn
down and the IRQ may be stale.

Signed-off-by: Yongxing Mou <yongxing.mou@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/dp/dp_display.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 40b2f6e120cf..8e30420a017f 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1131,7 +1131,10 @@ static irqreturn_t msm_dp_display_irq_thread(int irq, void *dev_id)
drm_bridge_hpd_notify(dp->msm_dp_display.bridge,
connector_status_connected);

- if (hpd_isr_status & DP_DP_IRQ_HPD_INT_MASK)
+ /* Do not access a link torn down by an unplug latched after an IRQ. */
+ if ((hpd_isr_status & DP_DP_IRQ_HPD_INT_MASK) &&
+ (!(hpd_isr_status & DP_DP_HPD_UNPLUG_INT_MASK) ||
+ (hpd_isr_status & DP_DP_HPD_PLUG_INT_MASK)))
drm_bridge_hpd_notify_extra(dp->msm_dp_display.bridge,
connector_status_connected,
DRM_CONNECTOR_DP_IRQ_HPD);

--
2.43.0