1*e2a4a6b1SFrançois Tigeot /*
2*e2a4a6b1SFrançois Tigeot * Copyright (c) 2020 François Tigeot <ftigeot@wolfpond.org>
3*e2a4a6b1SFrançois Tigeot * All rights reserved.
4*e2a4a6b1SFrançois Tigeot *
5*e2a4a6b1SFrançois Tigeot * Redistribution and use in source and binary forms, with or without
6*e2a4a6b1SFrançois Tigeot * modification, are permitted provided that the following conditions
7*e2a4a6b1SFrançois Tigeot * are met:
8*e2a4a6b1SFrançois Tigeot * 1. Redistributions of source code must retain the above copyright
9*e2a4a6b1SFrançois Tigeot * notice unmodified, this list of conditions, and the following
10*e2a4a6b1SFrançois Tigeot * disclaimer.
11*e2a4a6b1SFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright
12*e2a4a6b1SFrançois Tigeot * notice, this list of conditions and the following disclaimer in the
13*e2a4a6b1SFrançois Tigeot * documentation and/or other materials provided with the distribution.
14*e2a4a6b1SFrançois Tigeot *
15*e2a4a6b1SFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16*e2a4a6b1SFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17*e2a4a6b1SFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18*e2a4a6b1SFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19*e2a4a6b1SFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20*e2a4a6b1SFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21*e2a4a6b1SFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22*e2a4a6b1SFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23*e2a4a6b1SFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24*e2a4a6b1SFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*e2a4a6b1SFrançois Tigeot */
26*e2a4a6b1SFrançois Tigeot
27*e2a4a6b1SFrançois Tigeot #ifndef _LINUX_SYNC_FILE_H_
28*e2a4a6b1SFrançois Tigeot #define _LINUX_SYNC_FILE_H_
29*e2a4a6b1SFrançois Tigeot
30*e2a4a6b1SFrançois Tigeot #include <linux/types.h>
31*e2a4a6b1SFrançois Tigeot #include <linux/kref.h>
32*e2a4a6b1SFrançois Tigeot #include <linux/ktime.h>
33*e2a4a6b1SFrançois Tigeot #include <linux/list.h>
34*e2a4a6b1SFrançois Tigeot #include <linux/spinlock.h>
35*e2a4a6b1SFrançois Tigeot #include <linux/dma-fence.h>
36*e2a4a6b1SFrançois Tigeot
37*e2a4a6b1SFrançois Tigeot struct sync_file {
38*e2a4a6b1SFrançois Tigeot struct file *file;
39*e2a4a6b1SFrançois Tigeot };
40*e2a4a6b1SFrançois Tigeot
41*e2a4a6b1SFrançois Tigeot static inline struct dma_fence *
sync_file_get_fence(int fd)42*e2a4a6b1SFrançois Tigeot sync_file_get_fence(int fd)
43*e2a4a6b1SFrançois Tigeot {
44*e2a4a6b1SFrançois Tigeot /* sync_file_get_fence not implemented */
45*e2a4a6b1SFrançois Tigeot return NULL;
46*e2a4a6b1SFrançois Tigeot }
47*e2a4a6b1SFrançois Tigeot
48*e2a4a6b1SFrançois Tigeot static inline struct sync_file *
sync_file_create(struct dma_fence * fence)49*e2a4a6b1SFrançois Tigeot sync_file_create(struct dma_fence *fence)
50*e2a4a6b1SFrançois Tigeot {
51*e2a4a6b1SFrançois Tigeot kprintf("sync_file_create(): not implemented\n");
52*e2a4a6b1SFrançois Tigeot return NULL;
53*e2a4a6b1SFrançois Tigeot }
54*e2a4a6b1SFrançois Tigeot
55*e2a4a6b1SFrançois Tigeot #endif /* _LINUX_SYNC_FILE_H_ */
56