aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/ni.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-10-02 14:43:38 -0400
committerAlex Deucher <alexander.deucher@amd.com>2012-10-02 15:01:21 -0400
commit498522b455e8867bed5d59234c209b0be8ec4b57 (patch)
treee7d59e6d1574a1c89850d24cefa3fdf863ce8953 /drivers/gpu/drm/radeon/ni.c
parent76c44f2c0d008b60ce3058c51d85fa36d98c3681 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/ni.c')
-rw-r--r--drivers/gpu/drm/radeon/ni.c7
1 files changed, 3 insertions, 4 deletions
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);
}