aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1715-drm-amdgpu-fix-ATC-handling-for-Ryzen.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1715-drm-amdgpu-fix-ATC-handling-for-Ryzen.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1715-drm-amdgpu-fix-ATC-handling-for-Ryzen.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1715-drm-amdgpu-fix-ATC-handling-for-Ryzen.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1715-drm-amdgpu-fix-ATC-handling-for-Ryzen.patch
new file mode 100644
index 00000000..a15dc474
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1715-drm-amdgpu-fix-ATC-handling-for-Ryzen.patch
@@ -0,0 +1,47 @@
+From 6ee18319c53af25f32dfd856df267e252ce668d6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Thu, 28 Mar 2019 13:53:38 +0100
+Subject: [PATCH 1715/2940] drm/amdgpu: fix ATC handling for Ryzen
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Otherwise we don't correctly use translate further.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Signed-off-by: Chaudhary Amit Kumar <Chaudharyamit.Kumar@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index 9f5e3bf9c908..c50ecc5175c3 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -745,13 +745,17 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
+
+ addr = 0;
+ if (ats_entries) {
+- uint64_t ats_value;
+- ats_value = AMDGPU_PTE_DEFAULT_ATC;
+- if (level != AMDGPU_VM_PTB)
+- ats_value |= AMDGPU_PDE_PTE;
++ uint64_t value =0, flags;
++
++ flags = AMDGPU_PTE_DEFAULT_ATC;
++ if (level != AMDGPU_VM_PTB) {
++ /* Handle leaf PDEs as PTEs */
++ flags |= AMDGPU_PDE_PTE;
++ amdgpu_gmc_get_vm_pde(adev, level, &value, &flags);
++ }
+
+ r = vm->update_funcs->update(&params, bo, addr, 0, ats_entries,
+- 0, ats_value);
++ value, flags);
+ if (r)
+ return r;
+ addr += ats_entries * 8;
+--
+2.17.1
+