All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] drm/amdgpu: stop joining PDEs
@ 2017-12-08 16:41 Christian König
       [not found] ` <20171208164107.1567-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 21+ messages in thread
From: Christian König @ 2017-12-08 16:41 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

That doesn't hit any more most of the time anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 41 ++++++----------------------------
 1 file changed, 7 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3ecdbdfb04dd..d15b6edf7cce 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1076,8 +1076,7 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
 	struct amdgpu_bo *shadow;
 	struct amdgpu_ring *ring = NULL;
 	uint64_t pd_addr, shadow_addr = 0;
-	uint64_t last_pde = ~0, last_pt = ~0, last_shadow = ~0;
-	unsigned count = 0, pt_idx, ndw = 0;
+	unsigned pt_idx, ndw = 0;
 	struct amdgpu_job *job;
 	struct amdgpu_pte_update_params params;
 	struct dma_fence *fence = NULL;
@@ -1149,41 +1148,15 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
 
 		parent->entries[pt_idx].addr = pt | AMDGPU_PTE_VALID;
 
-		pde = pd_addr + pt_idx * 8;
 		incr = amdgpu_bo_size(bo);
-		if (((last_pde + 8 * count) != pde) ||
-		    ((last_pt + incr * count) != pt) ||
-		    (count == AMDGPU_VM_MAX_UPDATE_SIZE)) {
-
-			if (count) {
-				if (shadow)
-					params.func(&params,
-						    last_shadow,
-						    last_pt, count,
-						    incr,
-						    AMDGPU_PTE_VALID);
-
-				params.func(&params, last_pde,
-					    last_pt, count, incr,
-					    AMDGPU_PTE_VALID);
-			}
-
-			count = 1;
-			last_pde = pde;
-			last_shadow = shadow_addr + pt_idx * 8;
-			last_pt = pt;
-		} else {
-			++count;
+		if (shadow) {
+			pde = shadow_addr + pt_idx * 8;
+			params.func(&params, pde, pt, 1, incr,
+				    AMDGPU_PTE_VALID);
 		}
-	}
 
-	if (count) {
-		if (vm->root.base.bo->shadow)
-			params.func(&params, last_shadow, last_pt,
-				    count, incr, AMDGPU_PTE_VALID);
-
-		params.func(&params, last_pde, last_pt,
-			    count, incr, AMDGPU_PTE_VALID);
+		pde = pd_addr + pt_idx * 8;
+		params.func(&params, pde, pt, 1, incr, AMDGPU_PTE_VALID);
 	}
 
 	if (!vm->use_cpu_for_update) {
-- 
2.11.0

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

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

end of thread, other threads:[~2017-12-12  9:32 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-08 16:41 [PATCH 1/8] drm/amdgpu: stop joining PDEs Christian König
     [not found] ` <20171208164107.1567-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2017-12-08 16:41   ` [PATCH 2/8] drm/amdgpu: update one PDE at a time Christian König
     [not found]     ` <20171208164107.1567-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2017-12-11  5:37       ` Chunming Zhou
2017-12-08 16:41   ` [PATCH 3/8] drm/amdgpu: avoid the modulo in amdgpu_vm_get_entry Christian König
     [not found]     ` <20171208164107.1567-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2017-12-11  5:40       ` Chunming Zhou
2017-12-08 16:41   ` [PATCH 4/8] drm/amdgpu: remove last_entry_used from the VM code Christian König
     [not found]     ` <20171208164107.1567-4-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2017-12-11  5:52       ` Chunming Zhou
     [not found]         ` <a671871b-5bad-3d48-b76b-5db4d49c9624-5C7GfCeVMHo@public.gmane.org>
2017-12-11 12:08           ` Christian König
     [not found]             ` <8d22ff81-e27f-abe5-c3f3-3fbdf80334be-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-12  9:23               ` Christian König
     [not found]                 ` <aa19a12f-3d8b-74eb-75ae-e9c3cddf96b2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-12  9:32                   ` Chunming Zhou
2017-12-08 16:41   ` [PATCH 5/8] drm/amdgpu: remove keeping the addr of the VM PDs Christian König
     [not found]     ` <20171208164107.1567-5-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2017-12-11  5:59       ` Chunming Zhou
2017-12-08 16:41   ` [PATCH 6/8] drm/amdgpu: batch PDE updates again Christian König
     [not found]     ` <20171208164107.1567-6-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2017-12-11  6:13       ` Chunming Zhou
2017-12-08 16:41   ` [PATCH 7/8] drm/amdgpu: allow get_vm_pde to change flags as well Christian König
2017-12-08 16:41   ` [PATCH 8/8] drm/amdgpu: implement 2+1 PD support for Raven Christian König
     [not found]     ` <20171208164107.1567-8-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2017-12-11  6:49       ` Chunming Zhou
     [not found]         ` <7c8d12b8-7d2e-f5be-b8e7-295245c29a92-5C7GfCeVMHo@public.gmane.org>
2017-12-11 10:14           ` Christian König
2017-12-12  7:58       ` Chunming Zhou
     [not found]         ` <ebea9c30-b89e-898e-92a4-c8a2317b8b86-5C7GfCeVMHo@public.gmane.org>
2017-12-12  9:28           ` Christian König
2017-12-11  5:15   ` [PATCH 1/8] drm/amdgpu: stop joining PDEs Chunming Zhou

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.