aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-08-12 05:33:30 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-08-16 10:44:10 -0400
commitde9ea7bd366009d379043d49b5b2660c5b462483 (patch)
tree714f9563ca4b290d2e956e943211d402c5f550cd /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentb7fc2cbd5e9fd4fbac1c3a9fda6eff2b28b7bc4d (diff)
drm/amdgpu: cleanup the write_pte implementations
We don't need the gart mapping handling here any more. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> 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.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 51db44abdfa5..e0e40aca0f78 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -491,8 +491,8 @@ static void amdgpu_vm_update_pages(struct amdgpu_pte_update_params *params,
491 pe, (params->src + (addr >> 12) * 8), count); 491 pe, (params->src + (addr >> 12) * 8), count);
492 492
493 } else if (count < 3) { 493 } else if (count < 3) {
494 amdgpu_vm_write_pte(params->adev, params->ib, NULL, pe, addr, 494 amdgpu_vm_write_pte(params->adev, params->ib, pe,
495 count, incr, flags); 495 addr | flags, count, incr);
496 496
497 } else { 497 } else {
498 amdgpu_vm_set_pte_pde(params->adev, params->ib, pe, addr, 498 amdgpu_vm_set_pte_pde(params->adev, params->ib, pe, addr,
@@ -569,21 +569,15 @@ error:
569 * Look up the physical address of the page that the pte resolves 569 * Look up the physical address of the page that the pte resolves
570 * to and return the pointer for the page table entry. 570 * to and return the pointer for the page table entry.
571 */ 571 */
572uint64_t amdgpu_vm_map_gart(const dma_addr_t *pages_addr, uint64_t addr) 572static uint64_t amdgpu_vm_map_gart(const dma_addr_t *pages_addr, uint64_t addr)
573{ 573{
574 uint64_t result; 574 uint64_t result;
575 575
576 if (pages_addr) { 576 /* page table offset */
577 /* page table offset */ 577 result = pages_addr[addr >> PAGE_SHIFT];
578 result = pages_addr[addr >> PAGE_SHIFT];
579
580 /* in case cpu page size != gpu page size*/
581 result |= addr & (~PAGE_MASK);
582 578
583 } else { 579 /* in case cpu page size != gpu page size*/
584 /* No mapping required */ 580 result |= addr & (~PAGE_MASK);
585 result = addr;
586 }
587 581
588 result &= 0xFFFFFFFFFFFFF000ULL; 582 result &= 0xFFFFFFFFFFFFF000ULL;
589 583