aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_ring.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-08-08 06:22:43 -0400
committerAlex Deucher <alexander.deucher@amd.com>2012-09-20 13:10:39 -0400
commit9b40e5d8427f12567749978f66e86e5e8fced5ab (patch)
treeb4353bad316dc1e0d5a8e57d9acfcf7d3991770d /drivers/gpu/drm/radeon/radeon_ring.c
parentf82cbddddbd368f391d45738601fa29a75cfbe3b (diff)
drm/radeon: make VM flushs a ring operation
Move flushing the VMs as function into the rings. First step to make VM operations async. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ring.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index b9b1eddcd097..b4df25e2ac88 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -160,6 +160,10 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib,
160 if (!need_sync) { 160 if (!need_sync) {
161 radeon_semaphore_free(rdev, &ib->semaphore, NULL); 161 radeon_semaphore_free(rdev, &ib->semaphore, NULL);
162 } 162 }
163 /* if we can't remember our last VM flush then flush now! */
164 if (ib->vm && !ib->vm->last_flush) {
165 radeon_ring_vm_flush(rdev, ib->ring, ib);
166 }
163 if (const_ib) { 167 if (const_ib) {
164 radeon_ring_ib_execute(rdev, const_ib->ring, const_ib); 168 radeon_ring_ib_execute(rdev, const_ib->ring, const_ib);
165 radeon_semaphore_free(rdev, &const_ib->semaphore, NULL); 169 radeon_semaphore_free(rdev, &const_ib->semaphore, NULL);
@@ -174,6 +178,10 @@ int radeon_ib_schedule(struct radeon_device *rdev, struct radeon_ib *ib,
174 if (const_ib) { 178 if (const_ib) {
175 const_ib->fence = radeon_fence_ref(ib->fence); 179 const_ib->fence = radeon_fence_ref(ib->fence);
176 } 180 }
181 /* we just flushed the VM, remember that */
182 if (ib->vm && !ib->vm->last_flush) {
183 ib->vm->last_flush = radeon_fence_ref(ib->fence);
184 }
177 radeon_ring_unlock_commit(rdev, ring); 185 radeon_ring_unlock_commit(rdev, ring);
178 return 0; 186 return 0;
179} 187}