* [PATCH] drm/bridge: dw-mipi-dsi2: fail probe when runtime PM setup fails
@ 2026-11-29 13:43 Jiawen Liu
0 siblings, 0 replies; only message in thread
From: Jiawen Liu @ 2026-11-29 13:43 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Luca Ceresoli,
dri-devel, linux-kernel
devm_pm_runtime_enable() can fail after it has already rolled runtime PM
back to the disabled state. __dw_mipi_dsi2_probe() ignored that error and
could publish a MIPI DSI host whose mode-setting path then issues
pm_runtime_get_sync() calls against a runtime-PM-disabled device.
Propagate the setup error before registering the host.
Leave runtime PM cleanup to devres if host registration then fails, so
runtime PM is not disabled twice.
Fixes: 0d6d86253fef ("drm/bridge/synopsys: Add MIPI DSI2 host controller bridge")
Signed-off-by: Jiawen Liu <1298662399@qq.com>
---
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
index eb7d5713bd285..6ac2ed9378580 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c
@@ -973,14 +973,16 @@ __dw_mipi_dsi2_probe(struct platform_device *pdev,
clk_disable_unprepare(dsi2->pclk);
}
- devm_pm_runtime_enable(dev);
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return dev_err_ptr_probe(dev, ret,
+ "Failed to enable runtime PM\n");
dsi2->dsi_host.ops = &dw_mipi_dsi2_host_ops;
dsi2->dsi_host.dev = dev;
ret = mipi_dsi_host_register(&dsi2->dsi_host);
if (ret) {
dev_err(dev, "Failed to register MIPI host: %d\n", ret);
- pm_runtime_disable(dev);
return ERR_PTR(ret);
}
--
2.34.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-29 13:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29 13:43 [PATCH] drm/bridge: dw-mipi-dsi2: fail probe when runtime PM setup fails Jiawen Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®