Skip to content

Commit 64b22a0

Browse files
author
Abhinav Kumar
committed
drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path
If there are errors while trying to enable the pm in the bind path, it will lead to unclocked access of hw revision register thereby crashing the device. This will not address why the pm_runtime_get_sync() fails but at the very least we should be able to prevent the crash by handling the error and bailing out earlier. changes in v2: - use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() Fixes: 25fdd59 ("drm/msm: Add SDM845 DPU support") Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Patchwork: https://patchwork.freedesktop.org/patch/486721/ Link: https://lore.kernel.org/r/20220518223407.26147-1-quic_abhinavk@quicinc.com Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
1 parent cf961a5 commit 64b22a0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,9 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
10891089

10901090
dpu_kms_parse_data_bus_icc_path(dpu_kms);
10911091

1092-
pm_runtime_get_sync(&dpu_kms->pdev->dev);
1092+
rc = pm_runtime_resume_and_get(&dpu_kms->pdev->dev);
1093+
if (rc < 0)
1094+
goto error;
10931095

10941096
dpu_kms->core_rev = readl_relaxed(dpu_kms->mmio + 0x0);
10951097

0 commit comments

Comments
 (0)