]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdgpu: Fix SDMA engine reset logic
authorJesse.zhang@amd.com <Jesse.zhang@amd.com>
Mon, 17 Mar 2025 01:14:36 +0000 (09:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Mar 2025 18:03:47 +0000 (14:03 -0400)
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 <alexander.deucher@amd.com>
Signed-off-by: Jesse.Zhang <Jesse.zhang@amd.com>
Reviewed-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c

index 3a4cef896018574318cfd3fecc4406a375694ebd..1334c209201fb8d112b30c0fc22e77503028be4f 100644 (file)
@@ -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);
                }