aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1456-drm-amdkfd-Use-destroy_mqd-to-evict-queues-w-o-HWS.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1456-drm-amdkfd-Use-destroy_mqd-to-evict-queues-w-o-HWS.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/1456-drm-amdkfd-Use-destroy_mqd-to-evict-queues-w-o-HWS.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1456-drm-amdkfd-Use-destroy_mqd-to-evict-queues-w-o-HWS.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1456-drm-amdkfd-Use-destroy_mqd-to-evict-queues-w-o-HWS.patch
new file mode 100644
index 00000000..ec8ae3d6
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1456-drm-amdkfd-Use-destroy_mqd-to-evict-queues-w-o-HWS.patch
@@ -0,0 +1,37 @@
+From 496345808d0b79dbaf9edfc1fed6bdb16930e8dd Mon Sep 17 00:00:00 2001
+From: Felix Kuehling <Felix.Kuehling@amd.com>
+Date: Tue, 21 Jun 2016 09:47:06 -0400
+Subject: [PATCH 1456/4131] drm/amdkfd: Use destroy_mqd to evict queues w/o HWS
+
+Use destroy_mqd instead of load_mqd. Only destroy queues that were
+active to begin with and really need to be evicted.
+
+Change-Id: I423cb453e5fb6531317f6b8fbd3992bb18cb9af2
+Signed-off-by: Felix Kuehling <Felix.Kuehling@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 d5672b9..41a184c 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+@@ -493,10 +493,11 @@ int process_evict_queues(struct device_queue_manager *dqm,
+
+ retval = mqd->update_mqd(mqd, q->mqd, &q->properties);
+ if (dqm->sched_policy == KFD_SCHED_POLICY_NO_HWS &&
+- q->properties.type == KFD_QUEUE_TYPE_COMPUTE)
+- retval = mqd->load_mqd(mqd, q->mqd, q->pipe,
+- q->queue,
+- (uint32_t __user *)q->properties.write_ptr, 0);
++ q->properties.type == KFD_QUEUE_TYPE_COMPUTE &&
++ q->properties.is_evicted)
++ retval = mqd->destroy_mqd(mqd, q->mqd,
++ KFD_PREEMPT_TYPE_WAVEFRONT_DRAIN,
++ KFD_UNMAP_LATENCY_MS, q->pipe, q->queue);
+ if (q->properties.is_evicted)
+ dqm->queue_count--;
+ }
+--
+2.7.4
+