dma-buf/sync_file: add sync_file_get_fence()

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 <gustavo.padovan@collabora.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
This commit is contained in:
Gustavo Padovan
2016-08-05 10:39:36 -03:00
committed by Sumit Semwal
parent a02b9dc90d
commit 972526a409
2 changed files with 24 additions and 0 deletions

View File

@@ -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 */