Re: [PATCH v2] drm/msm/dp: hold one runtime PM reference per plugged state
From: Joonhoe Kim
Date: Sat Oct 24 2026 - 01:20:33 EST
On Sat, Oct 24, 2026 at 02:58:25AM +0000, Val Packett wrote:
> This part (msm_dp_hpd_plug_handle) is now also handled by the IRQ_HPD
> series:
Yes. v3 is on top of that series and keeps only the detect() part.
> * if we "find no change while unplugged" (!was_plugged &&
> !priv->plugged): no drop, is this intended or a leak still?
It does not leak: the existing put in the "if (!priv->plugged)" block
drops the function's own reference in that case, and only the second
put depends on was_plugged. Agreed that this is hard to see from the
code, though.
> * use a guard (probably PM_RUNTIME_ACQUIRE_IF_ENABLED to keep the error
> check) for this function's own reference;
> * and use a plain get an extra time when setting priv->plugged = true..?
Done in v3: the plugged state takes its reference with
pm_runtime_get_noresume() when detect() sets priv->plugged and drops
it when detect() clears it:
https://lore.kernel.org/all/20261024051952.2006-1-26rote@xxxxxxxxx/
Thanks,
Joonhoe Kim