aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4426-drm-amdkfd-Implement-queue-priority-controls-for-gfx.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4426-drm-amdkfd-Implement-queue-priority-controls-for-gfx.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4426-drm-amdkfd-Implement-queue-priority-controls-for-gfx.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4426-drm-amdkfd-Implement-queue-priority-controls-for-gfx.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4426-drm-amdkfd-Implement-queue-priority-controls-for-gfx.patch
new file mode 100644
index 00000000..74923291
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4426-drm-amdkfd-Implement-queue-priority-controls-for-gfx.patch
@@ -0,0 +1,53 @@
+From ff581b5b65390250d5438649963bb79983377070 Mon Sep 17 00:00:00 2001
+From: Yong Zhao <Yong.Zhao@amd.com>
+Date: Fri, 8 Nov 2019 21:15:48 -0500
+Subject: [PATCH 4426/4736] drm/amdkfd: Implement queue priority controls for
+ gfx10
+
+Ported from gfx9.
+
+Change-Id: I388dc7c609ed724a6d600840f8e7317d9c2c877d
+Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+index e2fb76247f47..79827017ea45 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
+@@ -66,6 +66,12 @@ static void update_cu_mask(struct mqd_manager *mm, void *mqd,
+ m->compute_static_thread_mgmt_se3);
+ }
+
++static void set_priority(struct v10_compute_mqd *m, struct queue_properties *q)
++{
++ m->cp_hqd_pipe_priority = pipe_priority_map[q->priority];
++ m->cp_hqd_queue_priority = q->priority;
++}
++
+ static struct kfd_mem_obj *allocate_mqd(struct kfd_dev *kfd,
+ struct queue_properties *q)
+ {
+@@ -109,9 +115,6 @@ static void init_mqd(struct mqd_manager *mm, void **mqd,
+ 1 << CP_HQD_QUANTUM__QUANTUM_SCALE__SHIFT |
+ 10 << CP_HQD_QUANTUM__QUANTUM_DURATION__SHIFT;
+
+- m->cp_hqd_pipe_priority = 1;
+- m->cp_hqd_queue_priority = 15;
+-
+ if (q->format == KFD_QUEUE_FORMAT_AQL) {
+ m->cp_hqd_aql_control =
+ 1 << CP_HQD_AQL_CONTROL__CONTROL0__SHIFT;
+@@ -208,6 +211,7 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,
+ m->cp_hqd_ctx_save_control = 0;
+
+ update_cu_mask(mm, mqd, q);
++ set_priority(m, q);
+
+ q->is_active = (q->queue_size > 0 &&
+ q->queue_address != 0 &&
+--
+2.17.1
+