summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2019-05-07 13:18:11 -0600
committerRob Clark <robdclark@chromium.org>2019-06-18 13:52:49 -0700
commit03b7af1ef4992bd0dc2b758e94698054fbbb19eb (patch)
tree29d90f70b25f4af408b422daa357f0981c4ba29f /drivers/gpu/drm/msm/adreno/a6xx_gmu.c
parentfecabfd9241f6c41ffa975803682028361791cad (diff)
drm/msm/adreno: Call pm_runtime_force_suspend() during unbind
The GPU specific pm_suspend code assumes that the hardware is active when the function is called, which it usually is when called as part of pm_runtime. But during unbind, the pm_suspend functions are called blindly resulting in a bit of a when the hardware wasn't already active (or booted, in the case of the GMU). Instead of calling the pm_suspend function directly, use pm_runtime_force_suspend() which should check the correct state of runtime and call the functions on our behalf or skip them if they are not needed. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/a6xx_gmu.c')
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_gmu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 5ab69dcd5479..2ca470eb5cb8 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -1232,9 +1232,7 @@ void a6xx_gmu_remove(struct a6xx_gpu *a6xx_gpu)
if (!gmu->initialized)
return;
- a6xx_gmu_stop(a6xx_gpu);
-
- pm_runtime_disable(gmu->dev);
+ pm_runtime_force_suspend(gmu->dev);
if (!IS_ERR_OR_NULL(gmu->gxpd)) {
pm_runtime_disable(gmu->gxpd);