aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_gart.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-08-06 14:21:10 -0400
committerAlex Deucher <alexander.deucher@amd.com>2012-09-20 13:10:38 -0400
commit05b0714768557c036fb9d74c197081fd2cba12bc (patch)
treee2411d20943ca9bcc3e38bd3c96e9eb38d3039b4 /drivers/gpu/drm/radeon/radeon_gart.c
parent4bf3dd9264cfb71f18714fcf2f810e276a44170b (diff)
drm/radeon: move VM funcs into asic structure
So it looks more like the rest of the driver. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_gart.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_gart.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index bb3b7fe05ccd..b01c6435cb10 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -448,7 +448,7 @@ int radeon_vm_manager_init(struct radeon_device *rdev)
448 return r; 448 return r;
449 } 449 }
450 450
451 r = rdev->vm_manager.funcs->init(rdev); 451 r = radeon_asic_vm_init(rdev);
452 if (r) 452 if (r)
453 return r; 453 return r;
454 454
@@ -476,7 +476,7 @@ int radeon_vm_manager_init(struct radeon_device *rdev)
476 } 476 }
477 } 477 }
478 478
479 r = rdev->vm_manager.funcs->bind(rdev, vm, vm->id); 479 r = radeon_asic_vm_bind(rdev, vm, vm->id);
480 if (r) { 480 if (r) {
481 DRM_ERROR("Failed to bind vm %d!\n", vm->id); 481 DRM_ERROR("Failed to bind vm %d!\n", vm->id);
482 } 482 }
@@ -522,7 +522,7 @@ static void radeon_vm_unbind_locked(struct radeon_device *rdev,
522 radeon_fence_unref(&vm->fence); 522 radeon_fence_unref(&vm->fence);
523 523
524 /* hw unbind */ 524 /* hw unbind */
525 rdev->vm_manager.funcs->unbind(rdev, vm); 525 radeon_asic_vm_unbind(rdev, vm);
526 rdev->vm_manager.use_bitmap &= ~(1 << vm->id); 526 rdev->vm_manager.use_bitmap &= ~(1 << vm->id);
527 list_del_init(&vm->list); 527 list_del_init(&vm->list);
528 vm->id = -1; 528 vm->id = -1;
@@ -553,7 +553,7 @@ void radeon_vm_manager_fini(struct radeon_device *rdev)
553 list_for_each_entry_safe(vm, tmp, &rdev->vm_manager.lru_vm, list) { 553 list_for_each_entry_safe(vm, tmp, &rdev->vm_manager.lru_vm, list) {
554 radeon_vm_unbind_locked(rdev, vm); 554 radeon_vm_unbind_locked(rdev, vm);
555 } 555 }
556 rdev->vm_manager.funcs->fini(rdev); 556 radeon_asic_vm_fini(rdev);
557 mutex_unlock(&rdev->vm_manager.lock); 557 mutex_unlock(&rdev->vm_manager.lock);
558 558
559 radeon_sa_bo_manager_suspend(rdev, &rdev->vm_manager.sa_manager); 559 radeon_sa_bo_manager_suspend(rdev, &rdev->vm_manager.sa_manager);
@@ -639,7 +639,7 @@ retry_id:
639 } 639 }
640 640
641 /* do hw bind */ 641 /* do hw bind */
642 r = rdev->vm_manager.funcs->bind(rdev, vm, id); 642 r = radeon_asic_vm_bind(rdev, vm, id);
643 if (r) { 643 if (r) {
644 radeon_sa_bo_free(rdev, &vm->sa_bo, NULL); 644 radeon_sa_bo_free(rdev, &vm->sa_bo, NULL);
645 return r; 645 return r;
@@ -830,14 +830,14 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev,
830 } 830 }
831 } 831 }
832 pfn = bo_va->soffset / RADEON_GPU_PAGE_SIZE; 832 pfn = bo_va->soffset / RADEON_GPU_PAGE_SIZE;
833 flags = rdev->vm_manager.funcs->page_flags(rdev, bo_va->vm, bo_va->flags); 833 flags = radeon_asic_vm_page_flags(rdev, bo_va->vm, bo_va->flags);
834 for (i = 0, addr = 0; i < ngpu_pages; i++) { 834 for (i = 0, addr = 0; i < ngpu_pages; i++) {
835 if (mem && bo_va->valid) { 835 if (mem && bo_va->valid) {
836 addr = radeon_vm_get_addr(rdev, mem, i); 836 addr = radeon_vm_get_addr(rdev, mem, i);
837 } 837 }
838 rdev->vm_manager.funcs->set_page(rdev, bo_va->vm, i + pfn, addr, flags); 838 radeon_asic_vm_set_page(rdev, bo_va->vm, i + pfn, addr, flags);
839 } 839 }
840 rdev->vm_manager.funcs->tlb_flush(rdev, bo_va->vm); 840 radeon_asic_vm_tlb_flush(rdev, bo_va->vm);
841 return 0; 841 return 0;
842} 842}
843 843