aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0133-drm-amdgpu-Set-GTT-size-to-be-bigger-than-3-4-of-RAM.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0133-drm-amdgpu-Set-GTT-size-to-be-bigger-than-3-4-of-RAM.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0133-drm-amdgpu-Set-GTT-size-to-be-bigger-than-3-4-of-RAM.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0133-drm-amdgpu-Set-GTT-size-to-be-bigger-than-3-4-of-RAM.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0133-drm-amdgpu-Set-GTT-size-to-be-bigger-than-3-4-of-RAM.patch
new file mode 100644
index 00000000..e03934bf
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0133-drm-amdgpu-Set-GTT-size-to-be-bigger-than-3-4-of-RAM.patch
@@ -0,0 +1,35 @@
+From 703ca0aa86ad6f223443812fbdb95d563f439474 Mon Sep 17 00:00:00 2001
+From: Kent Russell <kent.russell@amd.com>
+Date: Fri, 23 Feb 2018 11:37:12 -0500
+Subject: [PATCH 0133/2940] drm/amdgpu: Set GTT size to be bigger than 3/4 of
+ RAM
+
+Change-Id: I1299df0889049983ad03bcf35e2bedf7f860dda9
+Signed-off-by: Kent Russell <kent.russell@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+index 334d7537b8ce..a060aa7ebe17 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+@@ -1789,11 +1789,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
+ struct sysinfo si;
+
+ si_meminfo(&si);
+- gtt_size = min(max((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
+- adev->gmc.mc_vram_size),
+- ((uint64_t)si.totalram * si.mem_unit * 3/4));
+- }
+- else
++ gtt_size = max3((AMDGPU_DEFAULT_GTT_SIZE_MB << 20),
++ adev->gmc.mc_vram_size,
++ ((uint64_t)si.totalram * si.mem_unit));
++ } else
+ gtt_size = (uint64_t)amdgpu_gtt_size << 20;
+
+ /* Initialize GTT memory pool */
+--
+2.17.1
+