drm/msm: Fix race of GPU init vs timestamp power management.
authorEric Anholt <eric@anholt.net>
Thu, 28 Jan 2021 21:03:30 +0000 (13:03 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:38:12 +0000 (11:38 +0100)
commitb605b8d568db0ede572de0c684a64f016e987d09
tree137fa29e87707c284eba94fa151ae1108b593423
parent5c49fc7b5d9b3aabf5e5bfb4fe96bbd3cc11e63f
drm/msm: Fix race of GPU init vs timestamp power management.

[ Upstream commit 7a7cbf2a819740674455ad36155c662367261296 ]

We were using the same force-poweron bit in the two codepaths, so they
could race to have one of them lose GPU power early.

freedreno CI was seeing intermittent errors like:
[drm:_a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set GPU_SET: 0x0
and this issue could have contributed to it.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 4b565ca5a2cb ("drm/msm: Add A6XX device support")
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
drivers/gpu/drm/msm/adreno/a6xx_gmu.h
drivers/gpu/drm/msm/adreno/a6xx_gpu.c