aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0214-drm-amdgpu-use-the-smaller-hole-for-GART.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0214-drm-amdgpu-use-the-smaller-hole-for-GART.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0214-drm-amdgpu-use-the-smaller-hole-for-GART.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0214-drm-amdgpu-use-the-smaller-hole-for-GART.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0214-drm-amdgpu-use-the-smaller-hole-for-GART.patch
new file mode 100644
index 00000000..75e1b118
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0214-drm-amdgpu-use-the-smaller-hole-for-GART.patch
@@ -0,0 +1,37 @@
+From 8efac3d290a6d2dc558b90c2ed840db1a40b0862 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Fri, 24 Aug 2018 09:40:10 +0200
+Subject: [PATCH 0214/2940] drm/amdgpu: use the smaller hole for GART
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Instead of the larger one use the smaller hole in the MC address
+space for the GART mappings.
+
+Change-Id: Ibb5d15772105b5fc52010825f85badc7abd4d12c
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+index 8269197df8e0..265ec6807130 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+@@ -132,7 +132,8 @@ void amdgpu_gmc_gart_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc)
+ mc->gart_size = max(size_bf, size_af);
+ }
+
+- if (size_bf > size_af)
++ if ((size_bf >= mc->gart_size && size_bf < size_af) ||
++ (size_af < mc->gart_size))
+ mc->gart_start = 0;
+ else
+ mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL);
+--
+2.17.1
+