From: Christian König Date: Wed, 31 Aug 2016 15:28:11 +0000 (+0200) Subject: drm/amdgpu: only try again if we actually run into -ENOMEM X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1abdc3d73dd9dc2f3dc619d466d378e70cbcc24a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- 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;