Skip to contentSkip to conversation

drm/amdgpu/sdma5: enable queue resets unconditionally

PATCH In review Alex Deucher 2 participants 4 messages Feb 3 – Feb 4

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/3 drm/amdgpu/sdma5: enable queue resets unconditionally

There is no firmware version dependency.

Fixes 59fd50b8663b ("drm/amdgpu: Add sysfs interface for sdma reset mask")
Cc Jesse Zhang <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +3 -12
index edb1e4d3f9292..afc22843f7940 100644
@@ -1427,18 +1427,9 @@ static int sdma_v5_0_sw_init(struct amdgpu_ip_block *ip_block)
 
 	adev->sdma.supported_reset =
 		amdgpu_get_soft_full_reset_mask(&adev->sdma.instance[0].ring);
-	switch (amdgpu_ip_version(adev, SDMA0_HWIP, 0)) {
-	case IP_VERSION(5, 0, 0):
-	case IP_VERSION(5, 0, 2):
-	case IP_VERSION(5, 0, 5):
-		if ((adev->sdma.instance[0].fw_version >= 35) &&
-		    !amdgpu_sriov_vf(adev) &&
-		    !adev->debug_disable_gpu_ring_reset)
-			adev->sdma.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
-		break;
-	default:
-		break;
-	}
+	if (!amdgpu_sriov_vf(adev) &&
+	    !adev->debug_disable_gpu_ring_reset)
+		adev->sdma.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
 
 	/* Allocate memory for SDMA IP Dump buffer */
 	ptr = kcalloc(adev->sdma.num_instances * reg_count, sizeof(uint32_t), GFP_KERNEL);
Signature · 1 line
2.52.0
author maintainer
#1 lore raw

PATCH 2/3 drm/amdgpu/sdma5.2: enable queue resets unconditionally

There is no firmware version dependency. This also enables sdma queue resets on all SDMA 5.2.x based chips.

Fixes 59fd50b8663b ("drm/amdgpu: Add sysfs interface for sdma reset mask")
Cc Jesse Zhang <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +3 -19
index a57fe976cccaf..d607906bf2119 100644
@@ -1346,25 +1346,9 @@ static int sdma_v5_2_sw_init(struct amdgpu_ip_block *ip_block)
 
 	adev->sdma.supported_reset =
 		amdgpu_get_soft_full_reset_mask(&adev->sdma.instance[0].ring);
-	switch (amdgpu_ip_version(adev, SDMA0_HWIP, 0)) {
-	case IP_VERSION(5, 2, 0):
-	case IP_VERSION(5, 2, 2):
-	case IP_VERSION(5, 2, 3):
-	case IP_VERSION(5, 2, 4):
-		if ((adev->sdma.instance[0].fw_version >= 76) &&
-		    !amdgpu_sriov_vf(adev) &&
-		    !adev->debug_disable_gpu_ring_reset)
-			adev->sdma.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
-		break;
-	case IP_VERSION(5, 2, 5):
-		if ((adev->sdma.instance[0].fw_version >= 34) &&
-		    !amdgpu_sriov_vf(adev) &&
-		    !adev->debug_disable_gpu_ring_reset)
-			adev->sdma.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
-		break;
-	default:
-		break;
-	}
+	if (!amdgpu_sriov_vf(adev) &&
+	    !adev->debug_disable_gpu_ring_reset)
+		adev->sdma.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
 
 	/* Allocate memory for SDMA IP Dump buffer */
 	ptr = kcalloc(adev->sdma.num_instances * reg_count, sizeof(uint32_t), GFP_KERNEL);
Signature · 1 line
2.52.0
author maintainer
#2 lore raw

PATCH 3/3 drm/amdgpu/sdma6: enable queue resets unconditionally

In reply to Alex Deucher

There is no firmware version dependency. This also enables sdma queue resets on all SDMA 6.x based chips.

Fixes 59fd50b8663b ("drm/amdgpu: Add sysfs interface for sdma reset mask")
Cc Jesse Zhang <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c +3 -12
index 210ea6ba6212f..6070345ed91ad 100644
@@ -1368,18 +1368,9 @@ static int sdma_v6_0_sw_init(struct amdgpu_ip_block *ip_block)
 
 	adev->sdma.supported_reset =
 		amdgpu_get_soft_full_reset_mask(&adev->sdma.instance[0].ring);
-	switch (amdgpu_ip_version(adev, SDMA0_HWIP, 0)) {
-	case IP_VERSION(6, 0, 0):
-	case IP_VERSION(6, 0, 2):
-	case IP_VERSION(6, 0, 3):
-		if ((adev->sdma.instance[0].fw_version >= 21) &&
-		    !amdgpu_sriov_vf(adev) &&
-		    !adev->debug_disable_gpu_ring_reset)
-			adev->sdma.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
-		break;
-	default:
-		break;
-	}
+	if (!amdgpu_sriov_vf(adev) &&
+	    !adev->debug_disable_gpu_ring_reset)
+		adev->sdma.supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE;
 
 	if (amdgpu_sdma_ras_sw_init(adev)) {
 		dev_err(adev->dev, "Failed to initialize sdma ras block!\n");
Signature · 1 line
2.52.0
Reviewed-by on v1 1/3
#3 lore raw
In reply to Alex Deucher

[AMD Official Use Only - AMD Internal Distribution Only]

Series is:

Quoted 50 lines

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Wednesday, February 4, 2026 1:05 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Zhang, Jesse(Jie) <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu/sdma5: enable queue resets unconditionally

There is no firmware version dependency.

Fixes 59fd50b8663b ("drm/amdgpu: Add sysfs interface for sdma reset mask")
Cc Jesse Zhang <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +3 -12
index edb1e4d3f9292..afc22843f7940 100644
@@ -1427,18 +1427,9 @@ static int sdma_v5_0_sw_init(struct amdgpu_ip_block
 *ip_block)
 
      adev->sdma.supported_reset =
              amdgpu_get_soft_full_reset_mask(&adev->sdma.instance[0].ring);
-     switch (amdgpu_ip_version(adev, SDMA0_HWIP, 0)) {
-     case IP_VERSION(5, 0, 0):
-     case IP_VERSION(5, 0, 2):
-     case IP_VERSION(5, 0, 5):
-             if ((adev->sdma.instance[0].fw_version >= 35) &&
-                 !amdgpu_sriov_vf(adev) &&
-                 !adev->debug_disable_gpu_ring_reset)
-                     adev->sdma.supported_reset |=
 AMDGPU_RESET_TYPE_PER_QUEUE;
-             break;
-     default:
-             break;
-     }
+     if (!amdgpu_sriov_vf(adev) &&
+         !adev->debug_disable_gpu_ring_reset)
+             adev->sdma.supported_reset |=
 AMDGPU_RESET_TYPE_PER_QUEUE;
      /* Allocate memory for SDMA IP Dump buffer */
      ptr = kcalloc(adev->sdma.num_instances * reg_count, sizeof(uint32_t),

GFP_KERNEL);
--
2.52.0