aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2101-drm-amdkfd-Init-evict-restore-work-before-allocating.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2101-drm-amdkfd-Init-evict-restore-work-before-allocating.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2101-drm-amdkfd-Init-evict-restore-work-before-allocating.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2101-drm-amdkfd-Init-evict-restore-work-before-allocating.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2101-drm-amdkfd-Init-evict-restore-work-before-allocating.patch
new file mode 100644
index 00000000..3ffb7d91
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2101-drm-amdkfd-Init-evict-restore-work-before-allocating.patch
@@ -0,0 +1,44 @@
+From 0cd2b01c4887136e69df5c0aa6f2c354d22acf6d Mon Sep 17 00:00:00 2001
+From: Felix Kuehling <Felix.Kuehling@amd.com>
+Date: Tue, 31 Oct 2017 13:52:37 -0400
+Subject: [PATCH 2101/4131] drm/amdkfd: Init evict/restore work before
+ allocating memory
+
+The eviction and restore work items must be ready before the first
+memory allocations during process creation.
+
+Change-Id: I481df6ef809ff462286b7ac475fd2fc459ce1323
+Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+index b9f7e9a..fab1d59 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+@@ -621,6 +621,10 @@ static struct kfd_process *create_process(const struct task_struct *thread,
+ if (err != 0)
+ goto err_init_apertures;
+
++ INIT_DELAYED_WORK(&process->eviction_work.dwork, kfd_evict_bo_worker);
++ INIT_DELAYED_WORK(&process->restore_work, kfd_restore_bo_worker);
++ process->last_restore_timestamp = get_jiffies_64();
++
+ err = kfd_process_reserve_ib_mem(process);
+ if (err)
+ goto err_reserve_ib_mem;
+@@ -628,10 +632,6 @@ static struct kfd_process *create_process(const struct task_struct *thread,
+ if (err)
+ goto err_init_cwsr;
+
+- INIT_DELAYED_WORK(&process->eviction_work.dwork, kfd_evict_bo_worker);
+- INIT_DELAYED_WORK(&process->restore_work, kfd_restore_bo_worker);
+- process->last_restore_timestamp = get_jiffies_64();
+-
+ /* If PeerDirect interface was not detected try to detect it again
+ * in case if network driver was loaded later.
+ */
+--
+2.7.4
+