AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] drm/amdgpu: Trigger a wedged event for ring reset
@ 2025-02-25  1:02 André Almeida
  2025-03-04  9:29 ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: André Almeida @ 2025-02-25  1:02 UTC (permalink / raw)
  To: Alex Deucher, 'Christian König', Xinhui Pan, amd-gfx,
	dri-devel, linux-kernel, kernel-dev, siqueira
  Cc: André Almeida

Instead of only triggering a wedged event for complete GPU resets,
trigger for ring resets. Regardless of the reset, it's useful for
userspace to know that it happened because the kernel will reject
further submissions from that app.

Signed-off-by: André Almeida <andrealmeid@igalia.com>
---
v3: do only for ring resets, no soft recoveries
v2: Keep the wedge event in amdgpu_device_gpu_recover() and add and
    extra check to avoid triggering two events.
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 698e5799e542..760a720c842e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -150,6 +150,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
 			if (amdgpu_ring_sched_ready(ring))
 				drm_sched_start(&ring->sched, 0);
 			dev_err(adev->dev, "Ring %s reset succeeded\n", ring->sched.name);
+			drm_dev_wedged_event(adev_to_drm(adev), DRM_WEDGE_RECOVERY_NONE);
 			goto exit;
 		}
 		dev_err(adev->dev, "Ring %s reset failure\n", ring->sched.name);
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-10 18:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25  1:02 [PATCH v3] drm/amdgpu: Trigger a wedged event for ring reset André Almeida
2025-03-04  9:29 ` Christian König
2025-03-10 18:54   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox