diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-06-21 06:52:09 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 19:06:03 (GMT) |
commit | a0250d36bd05bea9227a73328833782f57a1fa48 (patch) | |
tree | 8a26af74af5bac8c926b44b67f4230b4a6adbed7 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 6adb0513a4bf8ac0b11b3f7676e4e4210016aadd (diff) | |
download | linux-a0250d36bd05bea9227a73328833782f57a1fa48.tar.xz |
drm/amdgpu: save/restore bios scratch when gpu reset
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a136477..153d0ca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1951,6 +1951,8 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) /* block TTM */ resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev); + /* save scratch */ + amdgpu_atombios_scratch_regs_save(adev); r = amdgpu_suspend(adev); for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { @@ -1975,7 +1977,8 @@ retry: dev_info(adev->dev, "GPU reset succeeded, trying to resume\n"); r = amdgpu_resume(adev); } - + /* restore scratch */ + amdgpu_atombios_scratch_regs_restore(adev); if (!r) { for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = adev->rings[i]; |