From: Jesse.zhang@amd.com Date: Mon, 17 Mar 2025 01:14:36 +0000 (+0800) Subject: drm/amdgpu: Fix SDMA engine reset logic X-Git-Tag: v6.15-rc1~120^2~1^2~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc63bcfd14a664a7ea78fd3c9d0014116b7e4619;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: Fix SDMA engine reset logic The scheduler should restart only if the reset operation succeeds This ensures that new tasks are only submitted to the queues after a successful reset. Fixes: 4c02f7301657 ("drm/amdgpu: Introduce conditional user queue suspension for SDMA resets") Suggested-by: Alex Deucher Signed-off-by: Jesse.Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c index 3a4cef8960185..1334c209201fb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c @@ -609,7 +609,7 @@ exit: * if they were stopped by this function. This allows new tasks * to be submitted to the queues after the reset is complete. */ - if (ret) { + if (!ret) { if (gfx_sched_stopped && amdgpu_ring_sched_ready(gfx_ring)) { drm_sched_wqueue_start(&gfx_ring->sched); }