drm/radeon: rework the vm_flush interface

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 <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 916d1cb..3319a9a 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -2789,10 +2789,9 @@
 {
 }
 
-void si_vm_flush(struct radeon_device *rdev, struct radeon_ib *ib)
+void si_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;
@@ -2826,7 +2825,7 @@
 				 WRITE_DATA_DST_SEL(0)));
 	radeon_ring_write(ring, VM_INVALIDATE_REQUEST >> 2);
 	radeon_ring_write(ring, 0);
-	radeon_ring_write(ring, 1 << ib->vm->id);
+	radeon_ring_write(ring, 1 << vm->id);
 }
 
 /*