diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-06-12 10:43:20 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 21:54:44 +0300 |
commit | 8b2ac103208b6933e265b3dc81776c2974cb5c7a (patch) | |
tree | ef907eefd0d81f6bb0dd80116e73a43b8757e403 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 0875dc9e80eb3b01406b21947c140265527488ba (diff) | |
download | linux-8b2ac103208b6933e265b3dc81776c2974cb5c7a.tar.xz |
drm/amdgpu: evict vram when gpu reset
On workstation cards with ECC vram, the entirety of vram is cleared to 0
on asic init to set the ECC status correctly. On non ECC boards, I don't
think they do any explicit clearing, but the vram controller is reset
which may cause issues with the data there.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a7a84286a06f..b9ddb4ffc90a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1896,6 +1896,9 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) atomic_inc(&adev->gpu_reset_counter); + /* evict vram memory */ + amdgpu_bo_evict_vram(adev); + /* block scheduler */ for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = adev->rings[i]; @@ -1904,6 +1907,7 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) continue; kthread_park(ring->sched.thread); } + /* block TTM */ resched = ttm_bo_lock_delayed_workqueue(&adev->mman.bdev); |