[PATCH] drm/amdgpu: record error code when ring test failed

Deucher, Alexander Alexander.Deucher at amd.com
Tue Aug 30 14:24:10 UTC 2016


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Chunming Zhou
> Sent: Tuesday, August 30, 2016 5:59 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhou, David(ChunMing)
> Subject: [PATCH] drm/amdgpu: record error code when ring test failed
> 
> Change-Id: I3a59f602a4d5ec42c8c184daa14eb8194b0dab9e
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
> ---
>  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
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list