diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2017-05-15 04:48:27 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 18:11:52 -0400 |
commit | f1892138abcb6d58359189f3b0a6c95f10613513 (patch) | |
tree | 127e78746b85e17adb9793c4d38f5aadab8e9f92 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 0c49e0b8a43c8addb0498cd32390f4ef08b5dd27 (diff) |
drm/amdgpu: return -ENODEV to user space when vram is lost v2
below ioctl will return -ENODEV:
amdgpu_cs_ioctl
amdgpu_cs_wait_ioctl
amdgpu_cs_wait_fences_ioctl
amdgpu_gem_va_ioctl
amdgpu_info_ioctl
v2: only for map and replace cases in amdgpu_gem_va_ioctl
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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 5a170071702a..794e14d8e906 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -2839,8 +2839,10 @@ retry: | |||
2839 | if (r) | 2839 | if (r) |
2840 | goto out; | 2840 | goto out; |
2841 | vram_lost = amdgpu_check_vram_lost(adev); | 2841 | vram_lost = amdgpu_check_vram_lost(adev); |
2842 | if (vram_lost) | 2842 | if (vram_lost) { |
2843 | DRM_ERROR("VRAM is lost!\n"); | 2843 | DRM_ERROR("VRAM is lost!\n"); |
2844 | atomic_inc(&adev->vram_lost_counter); | ||
2845 | } | ||
2844 | r = amdgpu_ttm_recover_gart(adev); | 2846 | r = amdgpu_ttm_recover_gart(adev); |
2845 | if (r) | 2847 | if (r) |
2846 | goto out; | 2848 | goto out; |