]> Git Repo - linux.git/commitdiff
drm/msm/dp: fix runtime_pm handling in dp_wait_hpd_asserted
authorDmitry Baryshkov <[email protected]>
Mon, 26 Feb 2024 22:34:45 +0000 (00:34 +0200)
committerRob Clark <[email protected]>
Wed, 5 Jun 2024 22:53:29 +0000 (15:53 -0700)
The function dp_wait_hpd_asserted() uses pm_runtime_get_sync() and
doesn't care about the return value. Potentially this can lead to
unclocked access if for some reason resuming of the DP controller fails.

Change the function to use pm_runtime_resume_and_get() and return an
error if resume fails.

Fixes: e2969ee30252 ("drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe()")
Signed-off-by: Dmitry Baryshkov <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Patchwork: https://patchwork.freedesktop.org/patch/580137/
Link: https://lore.kernel.org/r/[email protected]
[[email protected]: resolved trivial conflict while rebase]
Signed-off-by: Abhinav Kumar <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
drivers/gpu/drm/msm/dp/dp_aux.c

index da46a433bf747798d970145b10e563b4199a5f5d..00dfafbebe0e54496d7fe2dd0e75b610950bfec7 100644 (file)
@@ -513,7 +513,10 @@ static int dp_wait_hpd_asserted(struct drm_dp_aux *dp_aux,
 
        aux = container_of(dp_aux, struct dp_aux_private, dp_aux);
 
-       pm_runtime_get_sync(aux->dev);
+       ret = pm_runtime_resume_and_get(aux->dev);
+       if (ret)
+               return ret;
+
        ret = dp_catalog_aux_wait_for_hpd_connect_state(aux->catalog, wait_us);
        pm_runtime_put_sync(aux->dev);
 
This page took 0.057364 seconds and 4 git commands to generate.