mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
drm/msm/dp: fix runtime PM leak on connect failure
commite86750b01a
upstream. Make sure to balance the runtime PM usage counter (and suspend) before returning on connect failures (e.g. DPCD read failures after a spurious connect event or if link training fails). Fixes:5814b8bf08
("drm/msm/dp: incorporate pm_runtime framework into DP driver") Cc: stable@vger.kernel.org # 6.8 Cc: Kuogee Hsieh <quic_khsieh@quicinc.com> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/582746/ Link: https://lore.kernel.org/r/20240313164306.23133-3-johan+linaro@kernel.org Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
416558ca97
commit
2ce20f2d43
@ -598,6 +598,7 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data)
|
||||
ret = dp_display_usbpd_configure_cb(&pdev->dev);
|
||||
if (ret) { /* link train failed */
|
||||
dp->hpd_state = ST_DISCONNECTED;
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
} else {
|
||||
dp->hpd_state = ST_MAINLINK_READY;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user