Commit c8cf9ddc authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: avoid a warning in timedout job handler



Only set an error on the fence if the fence is not
signalled.  We can end up with a warning if the
per queue reset path signals the fence and sets an error
as part of the reset, but fails to recover.

Reviewed-by: default avatarTimur Kristóf <timur.kristof@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0288a345
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
		dev_err(adev->dev, "Ring %s reset failed\n", ring->sched.name);
	}

	if (dma_fence_get_status(&s_job->s_fence->finished) == 0)
		dma_fence_set_error(&s_job->s_fence->finished, -ETIME);

	if (amdgpu_device_should_recover_gpu(ring->adev)) {