aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1473-drm-amdgpu-clear-PDs-PTs-only-after-initializing-the.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1473-drm-amdgpu-clear-PDs-PTs-only-after-initializing-the.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1473-drm-amdgpu-clear-PDs-PTs-only-after-initializing-the.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1473-drm-amdgpu-clear-PDs-PTs-only-after-initializing-the.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1473-drm-amdgpu-clear-PDs-PTs-only-after-initializing-the.patch
new file mode 100644
index 00000000..aed243d2
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1473-drm-amdgpu-clear-PDs-PTs-only-after-initializing-the.patch
@@ -0,0 +1,62 @@
+From daca79a69e6b3c742eebbf0bb3c809ad0ce46739 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Wed, 30 Jan 2019 14:44:36 +0100
+Subject: [PATCH 1473/2940] drm/amdgpu: clear PDs/PTs only after initializing
+ them
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Clear the VM PDs/PTs only after initializing all the structures.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index 3121e375d2e0..6e96489900f1 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -926,10 +926,6 @@ int amdgpu_vm_alloc_pts(struct amdgpu_device *adev,
+ if (r)
+ return r;
+
+- r = amdgpu_vm_clear_bo(adev, vm, pt, cursor.level, ats);
+- if (r)
+- goto error_free_pt;
+-
+ if (vm->use_cpu_for_update) {
+ r = amdgpu_bo_kmap(pt, NULL);
+ if (r)
+@@ -942,6 +938,10 @@ int amdgpu_vm_alloc_pts(struct amdgpu_device *adev,
+ pt->parent = amdgpu_bo_ref(cursor.parent->base.bo);
+
+ amdgpu_vm_bo_base_init(&entry->base, vm, pt);
++
++ r = amdgpu_vm_clear_bo(adev, vm, pt, cursor.level, ats);
++ if (r)
++ goto error_free_pt;
+ }
+
+ return 0;
+@@ -3027,13 +3027,14 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
+ if (r)
+ goto error_unreserve;
+
++ amdgpu_vm_bo_base_init(&vm->root.base, vm, root);
++
+ r = amdgpu_vm_clear_bo(adev, vm, root,
+ adev->vm_manager.root_level,
+ vm->pte_support_ats);
+ if (r)
+ goto error_unreserve;
+
+- amdgpu_vm_bo_base_init(&vm->root.base, vm, root);
+ amdgpu_bo_unreserve(vm->root.base.bo);
+
+ if (pasid) {
+--
+2.17.1
+