diff options
author | Christian König <deathsimple@vodafone.de> | 2012-08-06 14:45:03 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2012-09-20 13:10:38 -0400 |
commit | d66a76269a57f84b785f7449818b843de1f07915 (patch) | |
tree | bd8af52ed66b7b74a0aafe0d589d8e7a09b0d914 /drivers/gpu/drm | |
parent | 05b0714768557c036fb9d74c197081fd2cba12bc (diff) |
drm/radeon: remove vm_unbind
It actually isn't very useful.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gart.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 12 |
5 files changed, 0 insertions, 29 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index fb6aa9dbd3a2..7786c4a60d6c 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -1509,17 +1509,6 @@ int cayman_vm_bind(struct radeon_device *rdev, struct radeon_vm *vm, int id) | |||
1509 | return 0; | 1509 | return 0; |
1510 | } | 1510 | } |
1511 | 1511 | ||
1512 | void cayman_vm_unbind(struct radeon_device *rdev, struct radeon_vm *vm) | ||
1513 | { | ||
1514 | WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR + (vm->id << 2), 0); | ||
1515 | WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR + (vm->id << 2), 0); | ||
1516 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (vm->id << 2), 0); | ||
1517 | /* flush hdp cache */ | ||
1518 | WREG32(HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1); | ||
1519 | /* bits 0-7 are the VM contexts0-7 */ | ||
1520 | WREG32(VM_INVALIDATE_REQUEST, 1 << vm->id); | ||
1521 | } | ||
1522 | |||
1523 | void cayman_vm_tlb_flush(struct radeon_device *rdev, struct radeon_vm *vm) | 1512 | void cayman_vm_tlb_flush(struct radeon_device *rdev, struct radeon_vm *vm) |
1524 | { | 1513 | { |
1525 | if (vm->id == -1) | 1514 | if (vm->id == -1) |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 5f54b87b181a..19a29db7c1f5 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -1116,7 +1116,6 @@ struct radeon_asic { | |||
1116 | int (*init)(struct radeon_device *rdev); | 1116 | int (*init)(struct radeon_device *rdev); |
1117 | void (*fini)(struct radeon_device *rdev); | 1117 | void (*fini)(struct radeon_device *rdev); |
1118 | int (*bind)(struct radeon_device *rdev, struct radeon_vm *vm, int id); | 1118 | int (*bind)(struct radeon_device *rdev, struct radeon_vm *vm, int id); |
1119 | void (*unbind)(struct radeon_device *rdev, struct radeon_vm *vm); | ||
1120 | void (*tlb_flush)(struct radeon_device *rdev, struct radeon_vm *vm); | 1119 | void (*tlb_flush)(struct radeon_device *rdev, struct radeon_vm *vm); |
1121 | uint32_t (*page_flags)(struct radeon_device *rdev, | 1120 | uint32_t (*page_flags)(struct radeon_device *rdev, |
1122 | struct radeon_vm *vm, | 1121 | struct radeon_vm *vm, |
@@ -1734,7 +1733,6 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v); | |||
1734 | #define radeon_asic_vm_init(rdev) (rdev)->asic->vm.init((rdev)) | 1733 | #define radeon_asic_vm_init(rdev) (rdev)->asic->vm.init((rdev)) |
1735 | #define radeon_asic_vm_fini(rdev) (rdev)->asic->vm.fini((rdev)) | 1734 | #define radeon_asic_vm_fini(rdev) (rdev)->asic->vm.fini((rdev)) |
1736 | #define radeon_asic_vm_bind(rdev, v, id) (rdev)->asic->vm.bind((rdev), (v), (id)) | 1735 | #define radeon_asic_vm_bind(rdev, v, id) (rdev)->asic->vm.bind((rdev), (v), (id)) |
1737 | #define radeon_asic_vm_unbind(rdev, v) (rdev)->asic->vm.unbind((rdev), (v)) | ||
1738 | #define radeon_asic_vm_tlb_flush(rdev, v) (rdev)->asic->vm.tlb_flush((rdev), (v)) | 1736 | #define radeon_asic_vm_tlb_flush(rdev, v) (rdev)->asic->vm.tlb_flush((rdev), (v)) |
1739 | #define radeon_asic_vm_page_flags(rdev, v, flags) (rdev)->asic->vm.page_flags((rdev), (v), (flags)) | 1737 | #define radeon_asic_vm_page_flags(rdev, v, flags) (rdev)->asic->vm.page_flags((rdev), (v), (flags)) |
1740 | #define radeon_asic_vm_set_page(rdev, v, pfn, addr, flags) (rdev)->asic->vm.set_page((rdev), (v), (pfn), (addr), (flags)) | 1738 | #define radeon_asic_vm_set_page(rdev, v, pfn, addr, flags) (rdev)->asic->vm.set_page((rdev), (v), (pfn), (addr), (flags)) |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index 951194c1d0a8..f524735f05ad 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
@@ -1376,7 +1376,6 @@ static struct radeon_asic cayman_asic = { | |||
1376 | .init = &cayman_vm_init, | 1376 | .init = &cayman_vm_init, |
1377 | .fini = &cayman_vm_fini, | 1377 | .fini = &cayman_vm_fini, |
1378 | .bind = &cayman_vm_bind, | 1378 | .bind = &cayman_vm_bind, |
1379 | .unbind = &cayman_vm_unbind, | ||
1380 | .tlb_flush = &cayman_vm_tlb_flush, | 1379 | .tlb_flush = &cayman_vm_tlb_flush, |
1381 | .page_flags = &cayman_vm_page_flags, | 1380 | .page_flags = &cayman_vm_page_flags, |
1382 | .set_page = &cayman_vm_set_page, | 1381 | .set_page = &cayman_vm_set_page, |
@@ -1480,7 +1479,6 @@ static struct radeon_asic trinity_asic = { | |||
1480 | .init = &cayman_vm_init, | 1479 | .init = &cayman_vm_init, |
1481 | .fini = &cayman_vm_fini, | 1480 | .fini = &cayman_vm_fini, |
1482 | .bind = &cayman_vm_bind, | 1481 | .bind = &cayman_vm_bind, |
1483 | .unbind = &cayman_vm_unbind, | ||
1484 | .tlb_flush = &cayman_vm_tlb_flush, | 1482 | .tlb_flush = &cayman_vm_tlb_flush, |
1485 | .page_flags = &cayman_vm_page_flags, | 1483 | .page_flags = &cayman_vm_page_flags, |
1486 | .set_page = &cayman_vm_set_page, | 1484 | .set_page = &cayman_vm_set_page, |
@@ -1584,7 +1582,6 @@ static struct radeon_asic si_asic = { | |||
1584 | .init = &si_vm_init, | 1582 | .init = &si_vm_init, |
1585 | .fini = &si_vm_fini, | 1583 | .fini = &si_vm_fini, |
1586 | .bind = &si_vm_bind, | 1584 | .bind = &si_vm_bind, |
1587 | .unbind = &si_vm_unbind, | ||
1588 | .tlb_flush = &si_vm_tlb_flush, | 1585 | .tlb_flush = &si_vm_tlb_flush, |
1589 | .page_flags = &cayman_vm_page_flags, | 1586 | .page_flags = &cayman_vm_page_flags, |
1590 | .set_page = &cayman_vm_set_page, | 1587 | .set_page = &cayman_vm_set_page, |
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index b01c6435cb10..1bcf26ff6a36 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
@@ -522,7 +522,6 @@ 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 | radeon_asic_vm_unbind(rdev, vm); | ||
526 | rdev->vm_manager.use_bitmap &= ~(1 << vm->id); | 525 | rdev->vm_manager.use_bitmap &= ~(1 << vm->id); |
527 | list_del_init(&vm->list); | 526 | list_del_init(&vm->list); |
528 | vm->id = -1; | 527 | vm->id = -1; |
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index e0846ce65f65..1a459ad485c9 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -2803,18 +2803,6 @@ int si_vm_bind(struct radeon_device *rdev, struct radeon_vm *vm, int id) | |||
2803 | return 0; | 2803 | return 0; |
2804 | } | 2804 | } |
2805 | 2805 | ||
2806 | void si_vm_unbind(struct radeon_device *rdev, struct radeon_vm *vm) | ||
2807 | { | ||
2808 | if (vm->id < 8) | ||
2809 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (vm->id << 2), 0); | ||
2810 | else | ||
2811 | WREG32(VM_CONTEXT8_PAGE_TABLE_BASE_ADDR + ((vm->id - 8) << 2), 0); | ||
2812 | /* flush hdp cache */ | ||
2813 | WREG32(HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1); | ||
2814 | /* bits 0-15 are the VM contexts0-15 */ | ||
2815 | WREG32(VM_INVALIDATE_REQUEST, 1 << vm->id); | ||
2816 | } | ||
2817 | |||
2818 | void si_vm_tlb_flush(struct radeon_device *rdev, struct radeon_vm *vm) | 2806 | void si_vm_tlb_flush(struct radeon_device *rdev, struct radeon_vm *vm) |
2819 | { | 2807 | { |
2820 | if (vm->id == -1) | 2808 | if (vm->id == -1) |