diff options
author | Christian König <christian.koenig@amd.com> | 2016-08-31 18:28:11 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-02 18:30:33 +0300 |
commit | 1abdc3d73dd9dc2f3dc619d466d378e70cbcc24a (patch) | |
tree | b1a2c2ee4bf52be23a2aadab40db4b5b8b549f49 /drivers | |
parent | a801abe4773dadcea4be4dc0affcc3a22d41543c (diff) | |
download | linux-1abdc3d73dd9dc2f3dc619d466d378e70cbcc24a.tar.xz |
drm/amdgpu: only try again if we actually run into -ENOMEM
All other errors can't be fixed by using a different memory domain.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 82927570333a..d7a957376a90 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -371,11 +371,9 @@ retry: p->bytes_moved += atomic64_read(&bo->adev->num_bytes_moved) - initial_bytes_moved; - if (unlikely(r)) { - if (r != -ERESTARTSYS && domain != bo->allowed_domains) { - domain = bo->allowed_domains; - goto retry; - } + if (unlikely(r == -ENOMEM) && domain != bo->allowed_domains) { + domain = bo->allowed_domains; + goto retry; } return r; |