Commit 1f465087 authored by Chunming Zhou's avatar Chunming Zhou Committed by Alex Deucher

drm/amdgpu: ib test first after gpu reset

Signed-off-by: default avatarChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent aa1c8900
...@@ -1987,6 +1987,16 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) ...@@ -1987,6 +1987,16 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
/* restore scratch */ /* restore scratch */
amdgpu_atombios_scratch_regs_restore(adev); amdgpu_atombios_scratch_regs_restore(adev);
if (!r) { if (!r) {
r = amdgpu_ib_ring_tests(adev);
if (r) {
dev_err(adev->dev, "ib ring test failed (%d).\n", r);
if (saved) {
saved = false;
r = amdgpu_suspend(adev);
goto retry;
}
}
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
struct amdgpu_ring *ring = adev->rings[i]; struct amdgpu_ring *ring = adev->rings[i];
if (!ring) if (!ring)
...@@ -1997,16 +2007,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) ...@@ -1997,16 +2007,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
ring_sizes[i] = 0; ring_sizes[i] = 0;
ring_data[i] = NULL; ring_data[i] = NULL;
} }
r = amdgpu_ib_ring_tests(adev);
if (r) {
dev_err(adev->dev, "ib ring test failed (%d).\n", r);
if (saved) {
saved = false;
r = amdgpu_suspend(adev);
goto retry;
}
}
} else { } else {
dev_err(adev->dev, "asic resume failed (%d).\n", r); dev_err(adev->dev, "asic resume failed (%d).\n", r);
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
......
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