aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2018-05-17 11:18:34 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-05-24 00:51:20 -0400
commitbf83060408fea52eccdcf695f3b4b16c71207691 (patch)
tree4155701722c5850cec2810ca05fad6276b40580f
parentdef139037bbf9195467fa83c0a299d666e6ed0bb (diff)
Remove calls to suspend/resume atomic helpers from amdgpu_device_gpu_recover. (v2)
First of all it's already being called from the display code from amd_ip_funcs.suspend/resume hooks. Second of all, the place in amdgpu_device_gpu_recover it's being called is wrong for GPU stalls since it is called BEFORE we cancel and force completion of all in flight jobs which were not yet processed. So, as Bas pointed in the ticket we will try to wait for fence in amdgpu_pm_compute_clocks but the pipe is hanged so we end up in deadlock. v2: remove unused variable Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106500 Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 0e3f69d31b80..adeb48ec4897 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3176,7 +3176,6 @@ error:
3176int amdgpu_device_gpu_recover(struct amdgpu_device *adev, 3176int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
3177 struct amdgpu_job *job, bool force) 3177 struct amdgpu_job *job, bool force)
3178{ 3178{
3179 struct drm_atomic_state *state = NULL;
3180 int i, r, resched; 3179 int i, r, resched;
3181 3180
3182 if (!force && !amdgpu_device_ip_check_soft_reset(adev)) { 3181 if (!force && !amdgpu_device_ip_check_soft_reset(adev)) {
@@ -3199,10 +3198,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
3199 /* block TTM */ 3198 /* block TTM */
3200 resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev); 3199 resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
3201 3200
3202 /* store modesetting */
3203 if (amdgpu_device_has_dc_support(adev))
3204 state = drm_atomic_helper_suspend(adev->ddev);
3205
3206 /* block all schedulers and reset given job's ring */ 3201 /* block all schedulers and reset given job's ring */
3207 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { 3202 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
3208 struct amdgpu_ring *ring = adev->rings[i]; 3203 struct amdgpu_ring *ring = adev->rings[i];
@@ -3242,10 +3237,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
3242 kthread_unpark(ring->sched.thread); 3237 kthread_unpark(ring->sched.thread);
3243 } 3238 }
3244 3239
3245 if (amdgpu_device_has_dc_support(adev)) { 3240 if (!amdgpu_device_has_dc_support(adev)) {
3246 if (drm_atomic_helper_resume(adev->ddev, state))
3247 dev_info(adev->dev, "drm resume failed:%d\n", r);
3248 } else {
3249 drm_helper_resume_force_mode(adev->ddev); 3241 drm_helper_resume_force_mode(adev->ddev);
3250 } 3242 }
3251 3243