Commit 06097e37 authored by Akhil P Oommen's avatar Akhil P Oommen Committed by Rob Clark

drm/msm: Correct pm_runtime votes in recover worker

In the scenario where there is one a single submit which is hung, gpu is
power collapsed when it is retired. Because of this, by the time we call
reover(), gpu state would be already clear. Fix this by correctly
managing the pm runtime votes.
Signed-off-by: default avatarAkhil P Oommen <quic_akhilpo@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/498391/
Link: https://lore.kernel.org/r/20220819015030.v5.3.Ib07ecec3d5c17cb0e1efa6fcddaaa019ec2fb556@changeidSigned-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 5b26f37d
...@@ -394,7 +394,6 @@ static void recover_worker(struct kthread_work *work) ...@@ -394,7 +394,6 @@ static void recover_worker(struct kthread_work *work)
/* Record the crash state */ /* Record the crash state */
pm_runtime_get_sync(&gpu->pdev->dev); pm_runtime_get_sync(&gpu->pdev->dev);
msm_gpu_crashstate_capture(gpu, submit, comm, cmd); msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
pm_runtime_put_sync(&gpu->pdev->dev);
kfree(cmd); kfree(cmd);
kfree(comm); kfree(comm);
...@@ -442,6 +441,8 @@ static void recover_worker(struct kthread_work *work) ...@@ -442,6 +441,8 @@ static void recover_worker(struct kthread_work *work)
} }
} }
pm_runtime_put_sync(&gpu->pdev->dev);
mutex_unlock(&gpu->lock); mutex_unlock(&gpu->lock);
msm_gpu_retire(gpu); msm_gpu_retire(gpu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment