> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf
> Of Christian König
> Sent: Thursday, September 01, 2016 10:16 AM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH 1/2] drm/amdgpu: only try again if we actually run into -
> ENOMEM
> 
> From: Christian König <christian.koe...@amd.com>
> 
> All other errors can't be fixed by using a different memory domain.
> 
> Signed-off-by: Christian König <christian.koe...@amd.com>

Reviewed-by: Alex Deucher <alexander.deuc...@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 8 +++-----
>  1 file 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 b0e11ca..23964b8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -372,11 +372,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;
> --
> 2.5.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to