提交 547f879a 编写于 作者: A Abhinav Kumar 提交者: Zheng Zengkai

drm/msm/dpu: handle pm_runtime_get_sync() errors in bind path

stable inclusion
from stable-v5.10.121
commit ffbcfb1688f6141f5286e6f41501fe9fb7af788a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ffbcfb1688f6141f5286e6f41501fe9fb7af788a

--------------------------------

[ Upstream commit 64b22a0d ]

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: 25fdd593 ("drm/msm: Add SDM845 DPU support")
Signed-off-by: NAbhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: NRob Clark <robdclark@gmail.com>
Reviewed-by: NStephen Boyd <swboyd@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/486721/
Link: https://lore.kernel.org/r/20220518223407.26147-1-quic_abhinavk@quicinc.comSigned-off-by: NAbhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 2aa31ed6
...@@ -939,7 +939,9 @@ static int dpu_kms_hw_init(struct msm_kms *kms) ...@@ -939,7 +939,9 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
dpu_kms_parse_data_bus_icc_path(dpu_kms); dpu_kms_parse_data_bus_icc_path(dpu_kms);
pm_runtime_get_sync(&dpu_kms->pdev->dev); rc = pm_runtime_resume_and_get(&dpu_kms->pdev->dev);
if (rc < 0)
goto error;
dpu_kms->core_rev = readl_relaxed(dpu_kms->mmio + 0x0); dpu_kms->core_rev = readl_relaxed(dpu_kms->mmio + 0x0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册