summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_vm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-09-04 20:01:53 +0200
committerAlex Deucher <alexander.deucher@amd.com>2014-09-11 10:46:01 -0400
commit57d20a43c9b30663bdbacde8294a902edef35a84 (patch)
tree1a2ab2ad48988611c498f8e8c202a6a90b1598da /drivers/gpu/drm/radeon/radeon_vm.c
parentae9c0af2c0ea92e57013ab2dd7271ba7d6b2a833 (diff)
downloadlinux-stable-57d20a43c9b30663bdbacde8294a902edef35a84.tar.gz
linux-stable-57d20a43c9b30663bdbacde8294a902edef35a84.tar.bz2
linux-stable-57d20a43c9b30663bdbacde8294a902edef35a84.zip
drm/radeon: add the infrastructure for concurrent buffer access
This allows us to specify if we want to sync to the shared fences of a reservation object or not. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_vm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_vm.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index 1cce4468cd75..ce870959dff8 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -696,15 +696,10 @@ int radeon_vm_update_page_directory(struct radeon_device *rdev,
incr, R600_PTE_VALID);
if (ib.length_dw != 0) {
- struct fence *fence;
-
radeon_asic_vm_pad_ib(rdev, &ib);
- fence = reservation_object_get_excl(pd->tbo.resv);
- radeon_semaphore_sync_to(ib.semaphore,
- (struct radeon_fence *)fence);
-
- radeon_semaphore_sync_to(ib.semaphore, vm->last_id_use);
+ radeon_semaphore_sync_resv(ib.semaphore, pd->tbo.resv, false);
+ radeon_semaphore_sync_fence(ib.semaphore, vm->last_id_use);
WARN_ON(ib.length_dw > ndw);
r = radeon_ib_schedule(rdev, &ib, NULL, false);
if (r) {
@@ -829,11 +824,8 @@ static void radeon_vm_update_ptes(struct radeon_device *rdev,
struct radeon_bo *pt = vm->page_tables[pt_idx].bo;
unsigned nptes;
uint64_t pte;
- struct fence *fence;
- fence = reservation_object_get_excl(pt->tbo.resv);
- radeon_semaphore_sync_to(ib->semaphore,
- (struct radeon_fence *)fence);
+ radeon_semaphore_sync_resv(ib->semaphore, pt->tbo.resv, false);
if ((addr & ~mask) == (end & ~mask))
nptes = end - addr;
@@ -975,7 +967,7 @@ int radeon_vm_bo_update(struct radeon_device *rdev,
radeon_asic_vm_pad_ib(rdev, &ib);
WARN_ON(ib.length_dw > ndw);
- radeon_semaphore_sync_to(ib.semaphore, vm->fence);
+ radeon_semaphore_sync_fence(ib.semaphore, vm->fence);
r = radeon_ib_schedule(rdev, &ib, NULL, false);
if (r) {
radeon_ib_free(rdev, &ib);