From 498522b455e8867bed5d59234c209b0be8ec4b57 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 2 Oct 2012 14:43:38 -0400 Subject: drm/radeon: rework the vm_flush interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass the vm and ring index rather than an IB. This allows us to use the vm_flush interface for non-IB cases in the future. Signed-off-by: Alex Deucher Reviewed-by: Christian König --- drivers/gpu/drm/radeon/ni.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/drm/radeon/ni.c') diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index f920a2c5ef2..9a46f7d4e61 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -1565,10 +1565,9 @@ void cayman_vm_set_page(struct radeon_device *rdev, uint64_t pe, * Update the page table base and flush the VM TLB * using the CP (cayman-si). */ -void cayman_vm_flush(struct radeon_device *rdev, struct radeon_ib *ib) +void cayman_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm) { - struct radeon_ring *ring = &rdev->ring[ib->ring]; - struct radeon_vm *vm = ib->vm; + struct radeon_ring *ring = &rdev->ring[ridx]; if (vm == NULL) return; @@ -1588,5 +1587,5 @@ void cayman_vm_flush(struct radeon_device *rdev, struct radeon_ib *ib) /* bits 0-7 are the VM contexts0-7 */ radeon_ring_write(ring, PACKET0(VM_INVALIDATE_REQUEST, 0)); - radeon_ring_write(ring, 1 << ib->vm->id); + radeon_ring_write(ring, 1 << vm->id); } -- cgit v1.2.3