aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2996-drm-amdkfd-Remove-GWS-from-process-during-uninit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2996-drm-amdkfd-Remove-GWS-from-process-during-uninit.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2996-drm-amdkfd-Remove-GWS-from-process-during-uninit.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2996-drm-amdkfd-Remove-GWS-from-process-during-uninit.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2996-drm-amdkfd-Remove-GWS-from-process-during-uninit.patch
new file mode 100644
index 00000000..a87554f9
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2996-drm-amdkfd-Remove-GWS-from-process-during-uninit.patch
@@ -0,0 +1,36 @@
+From 539de4f96970091637ca6df1da1e314f89f5657d Mon Sep 17 00:00:00 2001
+From: Joseph Greathouse <Joseph.Greathouse@amd.com>
+Date: Wed, 17 Jul 2019 09:47:58 -0500
+Subject: [PATCH 2996/4256] drm/amdkfd: Remove GWS from process during uninit
+
+If we shut down a process without having destroyed its GWS-using
+queues, it is possible that GWS BO will still be in the process
+BO list during the gpuvm destruction. This list should be empty
+at that time, so we should remove the GWS allocation at the
+process uninit point if it is still around.
+
+Change-Id: I098e7b315070dd5b0165bb7905aef643450f27f2
+Signed-off-by: Joseph Greathouse <Joseph.Greathouse@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+index da0958625861..7e6c3ee82f5b 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+@@ -150,6 +150,9 @@ void pqm_uninit(struct process_queue_manager *pqm)
+ struct process_queue_node *pqn, *next;
+
+ list_for_each_entry_safe(pqn, next, &pqm->queues, process_queue_list) {
++ if (pqn->q && pqn->q->gws)
++ amdgpu_amdkfd_remove_gws_from_process(pqm->process->kgd_process_info,
++ pqn->q->gws);
+ uninit_queue(pqn->q);
+ list_del(&pqn->process_queue_list);
+ kfree(pqn);
+--
+2.17.1
+