Commit 7d7fd05d authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by openeuler-sync-bot
Browse files

drm/msm/a5xx: fix context faults during ring switch

stable inclusion
from stable-v5.10.175
commit 4c43a0291f878bf194061b34e367f521f7066e25
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8711T

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



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

[ Upstream commit 32e70834 ]

The rptr_addr is set in the preempt_init_ring(), which is called from
a5xx_gpu_init(). It uses shadowptr() to set the address, however the
shadow_iova is not yet initialized at that time. Move the rptr_addr
setting to the a5xx_preempt_hw_init() which is called after setting the
shadow_iova, getting the correct value for the address.

Fixes: 8907afb4 ("drm/msm: Allow a5xx to mark the RPTR shadow as privileged")
Suggested-by: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/522640/
Link: https://lore.kernel.org/r/20230214020956.164473-5-dmitry.baryshkov@linaro.org


Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
(cherry picked from commit 0b3b32e2)
parent f13a18aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment