> -----Original Message-----
> From: amd-gfx [mailto:[email protected]] On Behalf
> Of Chunming Zhou
> Sent: Tuesday, August 30, 2016 5:59 AM
> To: [email protected]
> Cc: Zhou, David(ChunMing)
> Subject: [PATCH] drm/amdgpu: record error code when ring test failed
> 
> Change-Id: I3a59f602a4d5ec42c8c184daa14eb8194b0dab9e
> Signed-off-by: Chunming Zhou <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index f5810f7..8c17888 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -280,7 +280,7 @@ void amdgpu_ib_pool_fini(struct amdgpu_device
> *adev)
>  int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
>  {
>       unsigned i;
> -     int r;
> +     int r, ret = 0;
> 
>       for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
>               struct amdgpu_ring *ring = adev->rings[i];
> @@ -301,10 +301,11 @@ int amdgpu_ib_ring_tests(struct amdgpu_device
> *adev)
>                       } else {
>                               /* still not good, but we can live with it */
>                               DRM_ERROR("amdgpu: failed testing IB on
> ring %d (%d).\n", i, r);
> +                             ret = r;

Hmm, I think that was intentional so as not to fail completely even if some of 
the engines aren't working.

Alex

>                       }
>               }
>       }
> -     return 0;
> +     return ret;
>  }
> 
>  /*
> --
> 1.9.1
> 
> _______________________________________________
> amd-gfx mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to