aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3037-Revert-drm-amdgpu-Raise-KFD-system-memory-limits-to-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3037-Revert-drm-amdgpu-Raise-KFD-system-memory-limits-to-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3037-Revert-drm-amdgpu-Raise-KFD-system-memory-limits-to-.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3037-Revert-drm-amdgpu-Raise-KFD-system-memory-limits-to-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3037-Revert-drm-amdgpu-Raise-KFD-system-memory-limits-to-.patch
new file mode 100644
index 00000000..49c7bedc
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3037-Revert-drm-amdgpu-Raise-KFD-system-memory-limits-to-.patch
@@ -0,0 +1,42 @@
+From 1113dce5b58d45a0881f9d5ce4d05229c858ec38 Mon Sep 17 00:00:00 2001
+From: Kevin Wang <Kevin1.Wang@amd.com>
+Date: Tue, 2 Jan 2018 16:49:18 +0800
+Subject: [PATCH 3037/4131] Revert "drm/amdgpu: Raise KFD system memory limits
+ to 15/16"
+
+This reverts commit f145c9dccd4d9cfa2df5d06a70b6c45e6772f67a.
+
+Signed-off-by: Kevin Wang <Kevin1.Wang@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+index 236c366..3648269 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+@@ -102,8 +102,8 @@ static bool check_if_add_bo_to_vm(struct amdgpu_vm *avm,
+ }
+
+ /* Set memory usage limits. Current, limits are
+- * System (kernel) memory - 15/16th System RAM
+- * Userptr memory - 15/16th System RAM
++ * System (kernel) memory - 3/8th System RAM
++ * Userptr memory - 3/4th System RAM
+ */
+ void amdgpu_amdkfd_gpuvm_init_mem_limits(void)
+ {
+@@ -115,8 +115,8 @@ void amdgpu_amdkfd_gpuvm_init_mem_limits(void)
+ mem *= si.mem_unit;
+
+ spin_lock_init(&kfd_mem_limit.mem_limit_lock);
+- kfd_mem_limit.max_system_mem_limit = mem - (mem >> 4); /* 15/16 */
+- kfd_mem_limit.max_userptr_mem_limit = mem - (mem >> 4); /* 15/16 */
++ kfd_mem_limit.max_system_mem_limit = (mem >> 1) - (mem >> 3);
++ kfd_mem_limit.max_userptr_mem_limit = mem - (mem >> 2);
+ pr_debug("Kernel memory limit %lluM, userptr limit %lluM\n",
+ (kfd_mem_limit.max_system_mem_limit >> 20),
+ (kfd_mem_limit.max_userptr_mem_limit >> 20));
+--
+2.7.4
+