Skip to contentSkip to conversation

drm/amdgpu: Fix SDMA engine reset logic

PATCH In review [email protected] 2 participants 2 messages Mar 17, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 9b5d66721b66308a5 ("drm/amdgpu: Introduce conditional user queue suspension for SDMA resets")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +1 -1
index 3a4cef896018..1334c209201f 100644
@@ -609,7 +609,7 @@ int amdgpu_sdma_reset_engine(struct amdgpu_device *adev, uint32_t instance_id, b
 	 * 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);
 		}
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[Public]

This patch is,

Quoted 41 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, March 17, 2025 9:34 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; [email protected]; Huang, Tim <[email protected]>; Zhang, Jesse(Jie) <[email protected]>; Deucher, Alexander <[email protected]>; Zhang, Jesse(Jie) <[email protected]>
Subject: [PATCH] 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 9b5d66721b66308a5 ("drm/amdgpu: Introduce conditional user queue

suspension for SDMA resets")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +0 -0
index 3a4cef896018..1334c209201f 100644
@@ -609,7 +609,7 @@ int amdgpu_sdma_reset_engine(struct

amdgpu_device *adev, uint32_t instance_id, b
* if they were stopped by this function. This allows new tasks
* to be submitted to the queues after the reset is complete. */

drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c +1 -2
-     if (ret) {
+     if (!ret) {
              if (gfx_sched_stopped && amdgpu_ring_sched_ready(gfx_ring)) {
                      drm_sched_wqueue_start(&gfx_ring->sched);
              }
--

2.25.1