From 972526a4093243fdaf77dd7c6f8b11fba5b15864 Mon Sep 17 00:00:00 2001 From: Gustavo Padovan Date: Fri, 5 Aug 2016 10:39:36 -0300 Subject: dma-buf/sync_file: add sync_file_get_fence() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creates a function that given an sync file descriptor returns a fence containing all fences in the sync_file. v2: Comments by Daniel Vetter - Adapt to new version of fence_collection_init() - Hold a reference for the fence we return v3: - Adapt to use fput() directly - rename to sync_file_get_fence() as we always return one fence v4: Adapt to use fence_array v5: set fence through fence_get() Signed-off-by: Gustavo Padovan Reviewed-by: Chris Wilson Acked-by: Christian König Signed-off-by: Sumit Semwal --- include/linux/sync_file.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/sync_file.h') diff --git a/include/linux/sync_file.h b/include/linux/sync_file.h index 2efc5ec60575..f7de5a0b3d12 100644 --- a/include/linux/sync_file.h +++ b/include/linux/sync_file.h @@ -46,5 +46,6 @@ struct sync_file { }; struct sync_file *sync_file_create(struct fence *fence); +struct fence *sync_file_get_fence(int fd); #endif /* _LINUX_SYNC_H */ -- cgit v1.2.1