[PATCH] drm/amdgpu: Skip ring soft recovery when fence parent was NULL

Christian König ckoenig.leichtzumerken at gmail.com
Wed Dec 5 11:26:48 UTC 2018


Am 05.12.18 um 12:03 schrieb wentalou:
> amdgpu_ring_soft_recovery would have Call-Trace,
> when s_job->s_fence->parent was NULL inside amdgpu_job_timedout.
> Check parent first, as drm_sched_hw_job_reset did.
>
> Change-Id: I0b674ffd96afd44bcefe37a66fb157b1dbba61a0
> Signed-off-by: Wentao Lou <Wentao.Lou at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> index e0af44f..2945615 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
> @@ -33,7 +33,7 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)
>   	struct amdgpu_ring *ring = to_amdgpu_ring(s_job->sched);
>   	struct amdgpu_job *job = to_amdgpu_job(s_job);
>   
> -	if (amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {
> +	if (s_job->s_fence->parent && amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) {

Of hand that line looks to long to me, but apart from that the patch 
looks good.

Maybe add the NULL check to amdgpu_ring_soft_recovery instead?

Christian.

>   		DRM_ERROR("ring %s timeout, but soft recovered\n",
>   			  s_job->sched->name);
>   		return;



More information about the amd-gfx mailing list