Skip to contentSkip to conversation

amdkfd: Do nto wait for queue op response during reset

PATCH In review Ahmad Rehman 3 participants 3 messages Nov 4, 2025 – Nov 5, 2025

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

PATCH 1/1 amdkfd: Do nto wait for queue op response during reset

This patch adds the condition to not wait for the queue response for unmap, if the gpu is in reset.

---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -1
index 4fbe865ff279..0904c36192c7 100644
@@ -2094,7 +2094,8 @@ int amdkfd_fence_wait_timeout(struct device_queue_manager *dqm,
 
 	while (*fence_addr != fence_value) {
 		/* Fatal err detected, this response won't come */
-		if (amdgpu_amdkfd_is_fed(dqm->dev->adev))
+		if (amdgpu_amdkfd_is_fed(dqm->dev->adev) ||
+				amdgpu_in_reset(dqm->dev->adev))
 			return -EIO;
 
 		if (time_after(jiffies, end_jiffies)) {
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Ahmad Rehman

This patch adds the condition to not wait for the queue response for unmap, if the gpu is in reset.

Thanks,
Lijo

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -1
index 4fbe865ff279..0904c36192c7 100644
@@ -2094,7 +2094,8 @@ int amdkfd_fence_wait_timeout(struct device_queue_manager *dqm,
 
  	while (*fence_addr != fence_value) {
  		/* Fatal err detected, this response won't come */
-		if (amdgpu_amdkfd_is_fed(dqm->dev->adev))
+		if (amdgpu_amdkfd_is_fed(dqm->dev->adev) ||
+				amdgpu_in_reset(dqm->dev->adev))
  			return -EIO;
 
  		if (time_after(jiffies, end_jiffies)) {
#2 lore raw
In reply to Ahmad Rehman
Quoted 13 lines · Ahmad Rehman

This patch adds the condition to not wait for the queue response for unmap, if the gpu is in reset.

---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +0 -0
index 4fbe865ff279..0904c36192c7 100644

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c int amdkfd_fence_wait_timeout(struct device_queue_manager *dqm, · line 2101

Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -1
@@ -2094,7 +2094,8 @@ int amdkfd_fence_wait_timeout(struct device_queue_manager *dqm,
 
 	while (*fence_addr != fence_value) {
 		/* Fatal err detected, this response won't come */
-		if (amdgpu_amdkfd_is_fed(dqm->dev->adev))
+		if (amdgpu_amdkfd_is_fed(dqm->dev->adev) ||
+				amdgpu_in_reset(dqm->dev->adev))
 			return -EIO;
 
 		if (time_after(jiffies, end_jiffies)) {

Indentation of the second new line looks wrong, should be aligned to the opening parenthesis.

Signature · 2 lines
Earthling Michel Dänzer       \        GNOME / Xwayland / Mesa developer
https://redhat.com             \               Libre software enthusiast