Commit a0250d36 authored by Chunming Zhou's avatar Chunming Zhou Committed by Alex Deucher

drm/amdgpu: save/restore bios scratch when 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 6adb0513
...@@ -1951,6 +1951,8 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) ...@@ -1951,6 +1951,8 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
/* block TTM */ /* block TTM */
resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev); resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev);
/* save scratch */
amdgpu_atombios_scratch_regs_save(adev);
r = amdgpu_suspend(adev); r = amdgpu_suspend(adev);
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
...@@ -1975,7 +1977,8 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) ...@@ -1975,7 +1977,8 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
dev_info(adev->dev, "GPU reset succeeded, trying to resume\n"); dev_info(adev->dev, "GPU reset succeeded, trying to resume\n");
r = amdgpu_resume(adev); r = amdgpu_resume(adev);
} }
/* restore scratch */
amdgpu_atombios_scratch_regs_restore(adev);
if (!r) { if (!r) {
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];
......
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