diff options
author | Christian König <christian.koenig@amd.com> | 2014-02-20 10:47:05 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2014-03-03 11:03:35 +0100 |
commit | fa68834342e992dcb58e6dd7d9dbe05c6b6b27d9 (patch) | |
tree | cbbb16839a0eb8ff533b893bed17ca9cbc97e90d /drivers/gpu/drm/radeon/radeon_ring.c | |
parent | 2280ab57b6edc8581497d5e101c4694faf839c3e (diff) | |
download | linux-fa68834342e992dcb58e6dd7d9dbe05c6b6b27d9.tar.gz linux-fa68834342e992dcb58e6dd7d9dbe05c6b6b27d9.tar.bz2 linux-fa68834342e992dcb58e6dd7d9dbe05c6b6b27d9.zip |
drm/radeon: further cleanup vm flushing & fencing
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ring.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ring.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index fa140119cdb6..665591a7faad 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -153,11 +153,9 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib, return r; } - /* if we can't remember our last VM flush then flush now! */ - /* XXX figure out why we have to flush for every IB */ - if (ib->vm /*&& !ib->vm->last_flush*/) { - radeon_ring_vm_flush(rdev, ib->ring, ib->vm); - } + if (ib->vm) + radeon_vm_flush(rdev, ib->vm, ib->ring); + if (const_ib) { radeon_ring_ib_execute(rdev, const_ib->ring, const_ib); radeon_semaphore_free(rdev, &const_ib->semaphore, NULL); @@ -172,10 +170,10 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib, if (const_ib) { const_ib->fence = radeon_fence_ref(ib->fence); } - /* we just flushed the VM, remember that */ - if (ib->vm && !ib->vm->last_flush) { - ib->vm->last_flush = radeon_fence_ref(ib->fence); - } + + if (ib->vm) + radeon_vm_fence(rdev, ib->vm, ib->fence); + radeon_ring_unlock_commit(rdev, ring); return 0; } |