Skip to contentSkip to conversation

drm/amdkfd: Fix return value 0 when execute_queues_cpsch actually fails

PATCH In review Yong Zhao 2 participants 3 messages Jan 2, 2018 – Jan 10, 2018 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

Yong Zhao

author
#0 lore raw

PATCH 1/2 drm/amdkfd: Fix return value 0 when execute_queues_cpsch actually fails

---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1 -1
index d0693fd..acfb121 100644
@@ -1033,7 +1033,7 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
 
 	mutex_unlock(&dqm->lock);
 
-	return 0;
+	return retval;
 
 failed:
 failed_try_destroy_debugged_queue:
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1514916650-7042-1-git-send-email-yong.zhao-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/2 drm/amdkfd: avoid calling execute_queues_cpsch() when destroying an unactive queue

---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +5 -5
index acfb121..b21285a 100644
@@ -1013,13 +1013,13 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
 
 	list_del(&q->list);
 	qpd->queue_count--;
-	if (q->properties.is_active)
+	if (q->properties.is_active) {
 		dqm->queue_count--;
-
-	retval = execute_queues_cpsch(dqm,
+		retval = execute_queues_cpsch(dqm,
 				KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
-	if (retval == -ETIME)
-		qpd->reset_wavefronts = true;
+		if (retval == -ETIME)
+			qpd->reset_wavefronts = true;
+	}
 
 	mqd->uninit_mqd(mqd, q->mqd, q->mqd_mem_obj);
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1514916650-7042-2-git-send-email-yong.zhao-5C7GfCeVMHo@public.gmane.org

#4 lore raw

Re: [PATCH 2/2] drm/amdkfd: avoid calling execute_queues_cpsch() when destroying an unactive queue

Quoted 30 lines · Yong Zhao
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +5 -6
index acfb121..b21285a 100644
@@ -1013,13 +1013,13 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
 
        list_del(&q->list);
        qpd->queue_count--;
-       if (q->properties.is_active)
+       if (q->properties.is_active) {
                dqm->queue_count--;
-
-       retval = execute_queues_cpsch(dqm,
+               retval = execute_queues_cpsch(dqm,
                                KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
-       if (retval == -ETIME)
-               qpd->reset_wavefronts = true;
+               if (retval == -ETIME)
+                       qpd->reset_wavefronts = true;
+       }
 
        mqd->uninit_mqd(mqd, q->mqd, q->mqd_mem_obj);
 
--
Quoted 2 lines

2.7.4

Both patches applied to next.
Thanks,
Oded.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx