]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amdgpu: force completion for gpu reset
authorChunming Zhou <David1.Zhou@amd.com>
Thu, 30 Jun 2016 08:53:02 +0000 (16:53 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 7 Jul 2016 19:06:15 +0000 (15:06 -0400)
After all hw jobs are reset, hw fence is meaningless, so force_completion

Cc: William Lewis <minutemaidpark@hotmail.com>
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 1f6121a2a94b50db5002f51b8df70cdfb7e5126e..21e02df63730651a88b4ff3a3fa33102f6e1bb24 100644 (file)
@@ -1947,7 +1947,8 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
                        continue;
                kthread_park(ring->sched.thread);
        }
-
+       /* after all hw jobs are reset, hw fence is meaningless, so force_completion */
+       amdgpu_fence_driver_force_completion(adev);
 
        /* save scratch */
        amdgpu_atombios_scratch_regs_save(adev);
@@ -2005,7 +2006,7 @@ retry:
                        }
                }
        } else {
-               amdgpu_fence_driver_force_completion(adev);
+               dev_err(adev->dev, "asic resume failed (%d).\n", r);
                for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
                        if (adev->rings[i]) {
                                kthread_unpark(adev->rings[i]->sched.thread);