aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2108-drm-amdkfd-Make-unmapping-of-static-queues-condition.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2108-drm-amdkfd-Make-unmapping-of-static-queues-condition.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2108-drm-amdkfd-Make-unmapping-of-static-queues-condition.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2108-drm-amdkfd-Make-unmapping-of-static-queues-condition.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2108-drm-amdkfd-Make-unmapping-of-static-queues-condition.patch
new file mode 100644
index 00000000..1dd7587e
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2108-drm-amdkfd-Make-unmapping-of-static-queues-condition.patch
@@ -0,0 +1,47 @@
+From 9f5a2d5c0c791fc57302139a1741a4bf5ade4874 Mon Sep 17 00:00:00 2001
+From: Felix Kuehling <Felix.Kuehling@amd.com>
+Date: Mon, 25 Sep 2017 17:38:21 -0400
+Subject: [PATCH 2108/4131] drm/amdkfd: Make unmapping of static queues
+ conditional
+
+Only unmap static queues in process termination if the process being
+terminated is in debugger mode.
+
+Change-Id: I806ad14c789fb19468b1a9cf9a83e04783757d30
+Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+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 e0dc551..e762a59 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+@@ -1505,6 +1505,7 @@ static int process_termination_cpsch(struct device_queue_manager *dqm,
+ struct kernel_queue *kq, *kq_next;
+ struct mqd_manager *mqd;
+ struct device_process_node *cur, *next_dpn;
++ bool unmap_static_queues = false;
+
+ retval = 0;
+
+@@ -1516,6 +1517,7 @@ static int process_termination_cpsch(struct device_queue_manager *dqm,
+ dqm->queue_count--;
+ qpd->is_debug = false;
+ dqm->total_queue_count--;
++ unmap_static_queues = true;
+ }
+
+ /* Clear all user mode queues */
+@@ -1541,7 +1543,7 @@ static int process_termination_cpsch(struct device_queue_manager *dqm,
+ }
+ }
+
+- retval = execute_queues_cpsch(dqm, true);
++ retval = execute_queues_cpsch(dqm, unmap_static_queues);
+ if (retval || qpd->reset_wavefronts) {
+ pr_warn("Resetting wave fronts (cpsch) on dev %p\n", dqm->dev);
+ dbgdev_wave_reset_wavefronts(dqm->dev, qpd->pqm->process);
+--
+2.7.4
+