All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] drm/amdgpu: clear PDs/PTs only after initializing them
@ 2019-02-19 13:40 Christian König
       [not found] ` <20190219134103.1531-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Christian König @ 2019-02-19 13:40 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Clear the VM PDs/PTs only after initializing all the structures.

Signed-off-by: Christian König <christian.koenig@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 942b5ebc6dc2..12d51d96491e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -945,10 +945,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)
@@ -961,6 +957,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;
@@ -3031,13 +3031,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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-02-22 16:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-19 13:40 [PATCH 1/7] drm/amdgpu: clear PDs/PTs only after initializing them Christian König
     [not found] ` <20190219134103.1531-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-19 13:40   ` [PATCH 2/7] drm/amdgpu: rework shadow handling during PD clear Christian König
     [not found]     ` <20190219134103.1531-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-20  0:07       ` Kuehling, Felix
2019-02-22 15:51       ` Zeng, Oak
     [not found]         ` <BL0PR12MB258008B300413D2A0052EE5F807F0-b4cIHhjg/p/XzH18dTCKOgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-22 16:34           ` Grodzovsky, Andrey
2019-02-19 13:40   ` [PATCH 3/7] drm/amdgpu: let amdgpu_vm_clear_bo figure out ats status Christian König
     [not found]     ` <20190219134103.1531-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-20  0:42       ` Kuehling, Felix
2019-02-19 13:41   ` [PATCH 4/7] drm/amdgpu: allocate VM PDs/PTs on demand Christian König
2019-02-19 13:41   ` [PATCH 5/7] drm/amdgpu: free " Christian König
2019-02-19 13:41   ` [PATCH 6/7] drm/amdgpu: drop the huge page flag Christian König
2019-02-19 13:41   ` [PATCH 7/7] drm/amdgpu: allow huge invalid mappings on GMC8 Christian König
2019-02-20  0:43   ` [PATCH 1/7] drm/amdgpu: clear PDs/PTs only after initializing them Kuehling, Felix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.