]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/bridge: anx7625: enable HPD interrupts
authorAyushi Makhija <quic_amakhija@quicinc.com>
Mon, 5 May 2025 09:42:42 +0000 (15:12 +0530)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Mon, 5 May 2025 14:23:33 +0000 (17:23 +0300)
When the device enters the suspend state, it prevents
HPD interrupts from occurring. To address this, implement
.hpd_enable() and .hpd_disable() callbacks functions of
the drm_bridge.

Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250505094245.2660750-4-quic_amakhija@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/bridge/analogix/anx7625.c

index 8bfe477c476c045f8a08b6d646da7bae77693fdf..8cfae7f3c9eec16a37fdc86b427340edc929b6f8 100644 (file)
@@ -2475,6 +2475,22 @@ static const struct drm_edid *anx7625_bridge_edid_read(struct drm_bridge *bridge
        return anx7625_edid_read(ctx);
 }
 
+static void anx7625_bridge_hpd_enable(struct drm_bridge *bridge)
+{
+       struct anx7625_data *ctx = bridge_to_anx7625(bridge);
+       struct device *dev = ctx->dev;
+
+       pm_runtime_get_sync(dev);
+}
+
+static void anx7625_bridge_hpd_disable(struct drm_bridge *bridge)
+{
+       struct anx7625_data *ctx = bridge_to_anx7625(bridge);
+       struct device *dev = ctx->dev;
+
+       pm_runtime_put_sync(dev);
+}
+
 static const struct drm_bridge_funcs anx7625_bridge_funcs = {
        .attach = anx7625_bridge_attach,
        .detach = anx7625_bridge_detach,
@@ -2488,6 +2504,8 @@ static const struct drm_bridge_funcs anx7625_bridge_funcs = {
        .atomic_reset = drm_atomic_helper_bridge_reset,
        .detect = anx7625_bridge_detect,
        .edid_read = anx7625_bridge_edid_read,
+       .hpd_enable = anx7625_bridge_hpd_enable,
+       .hpd_disable = anx7625_bridge_hpd_disable,
 };
 
 static int anx7625_register_i2c_dummy_clients(struct anx7625_data *ctx,