summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_fence.c
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2012-01-05 22:11:06 -0500
committerDave Airlie <airlied@redhat.com>2012-01-06 09:16:09 +0000
commit93504fce28b1a387ec01f81b26637d237dca2b36 (patch)
tree7544b4fd960cbcbbfc17dea87aadd129eecf7b45 /drivers/gpu/drm/radeon/radeon_fence.c
parent721604a15b934f0a8d1909acb8017f029128be2f (diff)
downloadtalos-obmc-linux-93504fce28b1a387ec01f81b26637d237dca2b36.tar.gz
talos-obmc-linux-93504fce28b1a387ec01f81b26637d237dca2b36.zip
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_fence.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_fence.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c
index ae9e3da594a1..64ea3dd9e6ff 100644
--- a/drivers/gpu/drm/radeon/radeon_fence.c
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
@@ -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);
OpenPOWER on IntegriCloud