diff options
| author | Sushmita Susheelendra <ssusheel@codeaurora.org> | 2017-06-29 12:43:29 -0600 |
|---|---|---|
| committer | Sushmita Susheelendra <ssusheel@codeaurora.org> | 2017-09-07 15:04:47 -0600 |
| commit | a2d757fccc9597197dbfe37d5e4a26eb9f7306c2 (patch) | |
| tree | 3a6da4db3f54a659fedf6181ab3ceb899580e011 /drivers/gpu | |
| parent | 5ec068d55b0c11a34e986e96e4f0030c28bf316e (diff) | |
drm/msm: Decrement the device usage count on the recovery thread
A faulting submit is retired on the recovery worker and not
the retire worker. The usage count for the device must be
decremented for the faulting submit or the device will never
go into suspend following a fault despite being inactive for
the inactivity period.
Change-Id: Ieda698eb00008f5bcc7287f76b9261704e51e28b
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/msm/adreno/adreno_device.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 0415a65b0e72..4ecc3ad762ef 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -167,7 +167,7 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev) pm_runtime_get_sync(&pdev->dev); ret = msm_gpu_hw_init(gpu); - pm_runtime_put_sync(&pdev->dev); + pm_runtime_put_sync_autosuspend(&pdev->dev); if (ret) { dev_err(dev->dev, "gpu hw init failed: %d\n", ret); mutex_lock(&dev->struct_mutex); diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 9b5f9de1a517..44d9784d1bd7 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -257,9 +257,9 @@ static void recover_worker(struct work_struct *work) retire_guilty_submit(gpu, gpu->funcs->active_ring(gpu)); /* Recover the GPU */ - pm_runtime_get_sync(&gpu->pdev->dev); gpu->funcs->recover(gpu); - pm_runtime_put_sync(&gpu->pdev->dev); + /* Decrement the device usage count for the guilty submit */ + pm_runtime_put_sync_autosuspend(&gpu->pdev->dev); /* Replay the remaining on all rings, highest priority first */ for (i = 0; i < gpu->nr_rings; i++) { |
