aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5333-drm-amdgpu-fix-VM-clearing-for-the-root-PD.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5333-drm-amdgpu-fix-VM-clearing-for-the-root-PD.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5333-drm-amdgpu-fix-VM-clearing-for-the-root-PD.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5333-drm-amdgpu-fix-VM-clearing-for-the-root-PD.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5333-drm-amdgpu-fix-VM-clearing-for-the-root-PD.patch
new file mode 100644
index 00000000..12ac111e
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5333-drm-amdgpu-fix-VM-clearing-for-the-root-PD.patch
@@ -0,0 +1,42 @@
+From 510a6b573e8030f21d945cbdf350d573e50c5304 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Thu, 16 Aug 2018 12:01:03 +0200
+Subject: [PATCH 5333/5725] drm/amdgpu: fix VM clearing for the root PD
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We need to figure out the address after validating the BO, not before.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
+Reviewed-by: Huang Rui <ray.huang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index 4d39bf8..a6b9a3c 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -363,7 +363,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
+ uint64_t addr;
+ int r;
+
+- addr = amdgpu_bo_gpu_offset(bo);
+ entries = amdgpu_bo_size(bo) / 8;
+
+ if (pte_support_ats) {
+@@ -399,6 +398,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
+ if (r)
+ goto error;
+
++ addr = amdgpu_bo_gpu_offset(bo);
+ if (ats_entries) {
+ uint64_t ats_value;
+
+--
+2.7.4
+