[PATCH v2] drm/bridge: adv7511: Clear HPD IRQ during atomic_enable()
From: Biju
Date: Wed Apr 22 2026 - 08:19:31 EST
From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
On RZ/G3E SMARC EVK, suspend-to-RAM via PSCI powers down the ADV7535
chip entirely, causing the HPD status bit to be in a stale state on
resume. When the display controller driver's system PM resume callback
invokes drm_mode_config_helper_resume(), it calls the bridge's
atomic_enable(), but the stale HPD IRQ is never cleared, leading to
incorrect behaviour.
Clear the HPD status bit in adv7511_bridge_atomic_enable() after
powering on, so that any HPD interrupt latched before or during
power-loss is dismissed before normal operation resumes.
Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
Tested HPD, s2idle and s2ram on RZ/G3L SMARC EVK connected to ADV7535
on both polling and IRQ mode.
v1->v2:
* Dropped PM support instead clearing latched HPD status bit in
adv7511_bridge_atomic_enable()
* Dropped suspended variable from struct adv7511.
* Updated comment in adv7511_bridge_atomic_enable().
* Clearing the HPD status bit unconditionally as there is no harm.
* Updated commit header and description.
* Dropped the tags.
---
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 6bd76c1fb007..7663814b4032 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -792,6 +792,13 @@ static void adv7511_bridge_atomic_enable(struct drm_bridge *bridge,
adv7511_power_on(adv);
+ /*
+ * Clear the HPD status bit (ADV7511_INT0_HPD), so that any HPD
+ * interrupt latched before or during power loss is dismissed before
+ * normal operation resumes.
+ */
+ regmap_write(adv->regmap, ADV7511_REG_INT(0), ADV7511_INT0_HPD);
+
connector = drm_atomic_get_new_connector_for_encoder(state, bridge->encoder);
if (WARN_ON(!connector))
return;
--
2.43.0