drm: msm: a6xx: fix gpu failure after system resume
authorAkhil P Oommen <akhilpo@codeaurora.org>
Fri, 17 Jul 2020 14:34:18 +0000 (20:04 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:23:37 +0000 (08:23 +0200)
commit02407cb3b02061b1c603a6c25bcf8d5a6c3fdcf0
tree0be397a11909940c0f175fdddebfd312e0b5c5d4
parent7463012000574b27126e238fb1c8662672c5282f
drm: msm: a6xx: fix gpu failure after system resume

[ Upstream commit 57c0bd517c06b088106b0236ed604056c8e06da5 ]

On targets where GMU is available, GMU takes over the ownership of GX GDSC
during its initialization. So, move the refcount-get on GX PD before we
initialize the GMU. This ensures that nobody can collapse the GX GDSC
once GMU owns the GX GDSC. This patch fixes some GMU OOB errors seen
during GPU wake up during a system resume.

Reported-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
Tested-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c