]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: avoid a warning in timedout job handler
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 12 Dec 2025 16:46:48 +0000 (11:46 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 21:59:59 +0000 (16:59 -0500)
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: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

index 0a0dcbf0798d3fe0cfa66f0b21e4dad729e823a0..c533c080691236e6038eaa6ab5ab4677572f3f7b 100644 (file)
@@ -147,7 +147,8 @@ 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);
        }
 
-       dma_fence_set_error(&s_job->s_fence->finished, -ETIME);
+       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)) {
                struct amdgpu_reset_context reset_context;