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
blob: 49c7bedc38b36c4ee1a04dbbc4260eaad1e1709f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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