[PATCH 1/2] drm/amdgpu: only try again if we actually run into -ENOMEM
Deucher, Alexander
Alexander.Deucher at amd.com
Thu Sep 1 14:18:35 UTC 2016
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Christian König
> Sent: Thursday, September 01, 2016 10:16 AM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH 1/2] drm/amdgpu: only try again if we actually run into -
> ENOMEM
>
> From: Christian König <christian.koenig at amd.com>
>
> All other errors can't be fixed by using a different memory domain.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list