aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3397-drm-amdkfd-Cleanup-qpd.pqm-initialization.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3397-drm-amdkfd-Cleanup-qpd.pqm-initialization.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3397-drm-amdkfd-Cleanup-qpd.pqm-initialization.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3397-drm-amdkfd-Cleanup-qpd.pqm-initialization.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3397-drm-amdkfd-Cleanup-qpd.pqm-initialization.patch
new file mode 100644
index 00000000..a6050377
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3397-drm-amdkfd-Cleanup-qpd.pqm-initialization.patch
@@ -0,0 +1,46 @@
+From 94711d4b0a500793160a9c87ae33fb929c8f9f7d Mon Sep 17 00:00:00 2001
+From: Felix Kuehling <Felix.Kuehling@amd.com>
+Date: Tue, 14 Nov 2017 16:41:17 -0500
+Subject: [PATCH 3397/4131] drm/amdkfd: Cleanup qpd.pqm initialization
+
+The PQM doesn't change after process creation. So initialize it in
+kfd_create_process_device_data.
+
+Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 1 +
+ drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 4 +---
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+index 1f5ccd28..1bb9b26 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+@@ -348,6 +348,7 @@ struct kfd_process_device *kfd_create_process_device_data(struct kfd_dev *dev,
+ INIT_LIST_HEAD(&pdd->qpd.queues_list);
+ INIT_LIST_HEAD(&pdd->qpd.priv_queue_list);
+ pdd->qpd.dqm = dev->dqm;
++ pdd->qpd.pqm = &p->pqm;
+ pdd->process = p;
+ pdd->bound = PDD_UNBOUND;
+ pdd->already_dequeued = false;
+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 827a1f4..179d7f1 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+@@ -178,10 +178,8 @@ int pqm_create_queue(struct process_queue_manager *pqm,
+ return retval;
+
+ if (list_empty(&pdd->qpd.queues_list) &&
+- list_empty(&pdd->qpd.priv_queue_list)) {
+- pdd->qpd.pqm = pqm;
++ list_empty(&pdd->qpd.priv_queue_list))
+ dev->dqm->ops.register_process(dev->dqm, &pdd->qpd);
+- }
+
+ pqn = kzalloc(sizeof(*pqn), GFP_KERNEL);
+ if (!pqn) {
+--
+2.7.4
+