[PATCH v3 09/14] drm/bridge: analogix_dp: Move IRQ enable/disable to bind/unbind
From: Damon Ding
Date: Mon Sep 28 2026 - 04:23:20 EST
Move enable_irq()/disable_irq() from bridge enable/disable handlers
into analogix_dp_bind()/analogix_dp_unbind(). This keeps the IRQ
active throughout the device lifecycle rather than only during display
activity, which is a prerequisite for supporting HPD detection while
the display pipeline is inactive.
This is safe because the HPD interrupt sources are now managed
explicitly:
- Native HPD interrupt generation depends on the controller's power
domain and clock. When runtime PM has suspended the device, the
controller cannot produce interrupts, so the hardirq is never
entered on an unpowered device.
- For GPIO HPD mode, the native HPD interrupts are muted in
analogix_dp_config_interrupt(), and the hardirq reads only the GPIO
line via gpiod_get_value(), which is safe while the controller is
suspended.
Signed-off-by: Damon Ding <damon.ding@xxxxxxxxxxxxxx>
---
Changes in v3:
- Move this patch after mute/unmute related modification and detail the
commit msg.
---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index b92d28546192..addd319719de 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1018,7 +1018,6 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp)
goto out_dp_init;
}
- enable_irq(dp->irq);
return 0;
out_dp_init:
@@ -1160,8 +1159,6 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
if (dp->dpms_mode != DRM_MODE_DPMS_ON)
return;
- disable_irq(dp->irq);
-
analogix_dp_set_analog_power_down(dp, POWER_ALL, 1);
pm_runtime_put_sync(dp->dev);
@@ -1574,6 +1571,8 @@ int analogix_dp_bind(struct analogix_dp_device *dp, struct drm_device *drm_dev)
goto err_unregister_aux;
}
+ enable_irq(dp->irq);
+
return 0;
err_unregister_aux:
@@ -1585,6 +1584,7 @@ EXPORT_SYMBOL_GPL(analogix_dp_bind);
void analogix_dp_unbind(struct analogix_dp_device *dp)
{
+ disable_irq(dp->irq);
drm_dp_aux_unregister(&dp->aux);
}
EXPORT_SYMBOL_GPL(analogix_dp_unbind);
--
2.34.1