aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2220-drm-amdgpu-align-GTT-start-to-4GB-v2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2220-drm-amdgpu-align-GTT-start-to-4GB-v2.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2220-drm-amdgpu-align-GTT-start-to-4GB-v2.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2220-drm-amdgpu-align-GTT-start-to-4GB-v2.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2220-drm-amdgpu-align-GTT-start-to-4GB-v2.patch
new file mode 100644
index 00000000..7c93dc1a
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2220-drm-amdgpu-align-GTT-start-to-4GB-v2.patch
@@ -0,0 +1,38 @@
+From 8224e35e359ccac5154f05f9f1fe4cfcafed61c5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Thu, 16 Nov 2017 20:12:51 +0100
+Subject: [PATCH 2220/4131] drm/amdgpu: align GTT start to 4GB v2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For VCE to work properly the start of the GTT space must be aligned to a
+4GB boundary.
+
+v2: add comment why we do this
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index 3b653ed..ddb2716 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -619,7 +619,10 @@ void amdgpu_gart_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)
+ dev_warn(adev->dev, "limiting GTT\n");
+ mc->gart_size = size_af;
+ }
+- mc->gart_start = mc->vram_end + 1;
++ /* VCE doesn't like it when BOs cross a 4GB segment, so align
++ * the GART base on a 4GB boundary as well.
++ */
++ mc->gart_start = ALIGN(mc->vram_end + 1, 0x100000000ULL);
+ }
+ mc->gart_end = mc->gart_start + mc->gart_size - 1;
+ dev_info(adev->dev, "GTT: %lluM 0x%016llX - 0x%016llX\n",
+--
+2.7.4
+