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

Christian König deathsimple at vodafone.de
Tue Aug 30 12:24:26 UTC 2016


Am 30.08.2016 um 11:59 schrieb Chunming Zhou:
> Change-Id: I3a59f602a4d5ec42c8c184daa14eb8194b0dab9e
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>

Reviewed-by: Christian König <christian.koenig 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;
>   			}
>   		}
>   	}
> -	return 0;
> +	return ret;
>   }
>   
>   /*




More information about the amd-gfx mailing list