On Wed, Sep 16, 2026 at 10:04:05AM +0000, Wentao Liang wrote:
> cdns_dsi_bridge_atomic_pre_enable() resumes the DSI controller with
> pm_runtime_get_sync() and returns early with a WARN_ON() when the
> resume fails. pm_runtime_get_sync() increments the runtime PM usage
> count even when it fails, so returning without dropping the reference
> leaks it and prevents the device from ever suspending again once the
> error has been hit.
>
> Drop the runtime PM reference with pm_runtime_put_noidle() on the
> resume failure path before returning.
>
> Fixes: e19233955d9e ("drm/bridge: Add Cadence DSI driver")
> Cc: [email protected]
> Signed-off-by: Wentao Liang <[email protected]>
> ---
> drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> index 0dd85e26248c..fca4528edfa6 100644
> --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> @@ -733,8 +733,10 @@ static void cdns_dsi_bridge_atomic_pre_enable(struct
> drm_bridge *bridge,
> * enable their streams.
> */
>
> - if (WARN_ON(pm_runtime_get_sync(dsi->base.dev) < 0))
> + if (WARN_ON(pm_runtime_get_sync(dsi->base.dev) < 0)) {
> + pm_runtime_put_noidle(dsi->base.dev);
> return;
> + }
Anything wrong with pm_runtime_resume_and_get() ?
>
> new_bridge_state = drm_atomic_get_new_bridge_state(state, bridge);
> if (WARN_ON(!new_bridge_state))
--
Regards,
Laurent Pinchart