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>
This commit is contained in:
Christian König 2016-08-31 17:28:11 +02:00 committed by Alex Deucher
parent a801abe477
commit 1abdc3d73d

View File

@ -371,11 +371,9 @@ static int amdgpu_cs_bo_validate(struct amdgpu_cs_parser *p,
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;