diff options
author | Christian König <christian.koenig@amd.com> | 2017-11-30 14:12:53 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-12 14:45:34 -0500 |
commit | 94c6f5e4d1574094a91b1712536ab5b6a43f7a23 (patch) | |
tree | 929ee7c03458b9c2644899626ec332147d8529f8 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 79588d21ad312d9cd16a867c0d13278e6377a653 (diff) | |
download | linux-94c6f5e4d1574094a91b1712536ab5b6a43f7a23.tar.gz linux-94c6f5e4d1574094a91b1712536ab5b6a43f7a23.tar.bz2 linux-94c6f5e4d1574094a91b1712536ab5b6a43f7a23.zip |
drm/amdgpu: stop joining PDEs
That doesn't hit any more most of the time anyway.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 41 |
1 files 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 dbe37d621796..17ae6afdef70 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(¶ms, - last_shadow, - last_pt, count, - incr, - AMDGPU_PTE_VALID); - - params.func(¶ms, 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(¶ms, pde, pt, 1, incr, + AMDGPU_PTE_VALID); } - } - if (count) { - if (vm->root.base.bo->shadow) - params.func(¶ms, last_shadow, last_pt, - count, incr, AMDGPU_PTE_VALID); - - params.func(¶ms, last_pde, last_pt, - count, incr, AMDGPU_PTE_VALID); + pde = pd_addr + pt_idx * 8; + params.func(¶ms, pde, pt, 1, incr, AMDGPU_PTE_VALID); } if (!vm->use_cpu_for_update) { |