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>
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index cd517ab..ec4840c 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -255,16 +255,12 @@
 
 	for (i = 0; i < p->nrelocs; i++) {
 		struct reservation_object *resv;
-		struct fence *fence;
 
 		if (!p->relocs[i].robj)
 			continue;
 
 		resv = p->relocs[i].robj->tbo.resv;
-		fence = reservation_object_get_excl(resv);
-
-		radeon_semaphore_sync_to(p->ib.semaphore,
-					 (struct radeon_fence *)fence);
+		radeon_semaphore_sync_resv(p->ib.semaphore, resv, false);
 	}
 }
 
@@ -569,7 +565,7 @@
 		goto out;
 	}
 	radeon_cs_sync_rings(parser);
-	radeon_semaphore_sync_to(parser->ib.semaphore, vm->fence);
+	radeon_semaphore_sync_fence(parser->ib.semaphore, vm->fence);
 
 	if ((rdev->family >= CHIP_TAHITI) &&
 	    (parser->chunk_const_ib_idx != -1)) {