aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1323-drm-amdkfd-Fix-a-bug-that-process-cleanup-is-not-don.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1323-drm-amdkfd-Fix-a-bug-that-process-cleanup-is-not-don.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1323-drm-amdkfd-Fix-a-bug-that-process-cleanup-is-not-don.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1323-drm-amdkfd-Fix-a-bug-that-process-cleanup-is-not-don.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1323-drm-amdkfd-Fix-a-bug-that-process-cleanup-is-not-don.patch
new file mode 100644
index 00000000..09782c86
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1323-drm-amdkfd-Fix-a-bug-that-process-cleanup-is-not-don.patch
@@ -0,0 +1,45 @@
+From 129463bb6c80bd4bfc27e83844c9ceb986367f59 Mon Sep 17 00:00:00 2001
+From: Yong Zhao <Yong.Zhao@amd.com>
+Date: Fri, 28 Jul 2017 17:58:35 -0400
+Subject: [PATCH 1323/4131] drm/amdkfd: Fix a bug that process cleanup is not
+ done properly
+
+When destroying a queue fails in nocpsch, it may leave other queues
+not destroyed and process not unregistered. This commit fixes that.
+
+Change-Id: I9dcf7cb71242aa02e5b72c0381fec19a85f3dfe4
+Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+index 93bf90b..77cabd1 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+@@ -1430,9 +1430,11 @@ static int process_termination_nocpsch(struct device_queue_manager *dqm,
+
+ /* Clear all user mode queues */
+ list_for_each_entry_safe(q, next, &qpd->queues_list, list) {
+- retval = destroy_queue_nocpsch_locked(dqm, qpd, q);
+- if (retval)
+- goto out;
++ int ret;
++
++ ret = destroy_queue_nocpsch_locked(dqm, qpd, q);
++ if (ret)
++ retval = ret;
+ }
+
+ /* Unregister process */
+@@ -1445,7 +1447,6 @@ static int process_termination_nocpsch(struct device_queue_manager *dqm,
+ }
+ }
+
+-out:
+ mutex_unlock(&dqm->lock);
+ return retval;
+ }
+--
+2.7.4
+