]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/amdgpu: only try again if we actually run into -ENOMEM
authorChristian König <christian.koenig@amd.com>
Wed, 31 Aug 2016 15:28:11 +0000 (17:28 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Sep 2016 15:30:33 +0000 (11:30 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

index 82927570333a2fd7c24147b4a6b0bc0c59ee24dd..d7a957376a90b2f3f4f8e5036539f28273c39b39 100644 (file)
@@ -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;