drm/radeon/kms: Add support for multi-ring sync in CS ioctl (v2)

Use semaphores to sync buffers across rings in the CS
ioctl.  Add a reloc flag to allow userspace to skip
sync for buffers.

agd5f: port to latest CS ioctl changes.

v2: add ring lock/unlock to make sure changes hit the ring.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Christian König
2012-01-05 22:11:06 -05:00
committed by Dave Airlie
parent 721604a15b
commit 93504fce28
4 changed files with 53 additions and 0 deletions

View File

@@ -153,6 +153,8 @@ static void radeon_fence_destroy(struct kref *kref)
list_del(&fence->list);
fence->emitted = false;
write_unlock_irqrestore(&fence->rdev->fence_lock, irq_flags);
if (fence->semaphore)
radeon_semaphore_free(fence->rdev, fence->semaphore);
kfree(fence);
}
@@ -172,6 +174,7 @@ int radeon_fence_create(struct radeon_device *rdev,
(*fence)->signaled = false;
(*fence)->seq = 0;
(*fence)->ring = ring;
(*fence)->semaphore = NULL;
INIT_LIST_HEAD(&(*fence)->list);
write_lock_irqsave(&rdev->fence_lock, irq_flags);