summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_buffer.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_buffer.c b/src/lib/ecore_wl2/ecore_wl2_buffer.c
index faa811a447..92df71c786 100644
--- a/src/lib/ecore_wl2/ecore_wl2_buffer.c
+++ b/src/lib/ecore_wl2/ecore_wl2_buffer.c
@@ -17,7 +17,26 @@
17#include <sys/mman.h> 17#include <sys/mman.h>
18#include <sys/ioctl.h> 18#include <sys/ioctl.h>
19 19
20#if defined(__linux__)
20#include <linux/dma-buf.h> 21#include <linux/dma-buf.h>
22#elif defined(__FreeBSD__)
23/* begin/end dma-buf functions used for userspace mmap. */
24struct dma_buf_sync {
25 __u64 flags;
26};
27
28#define DMA_BUF_SYNC_READ (1 << 0)
29#define DMA_BUF_SYNC_WRITE (2 << 0)
30#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE)
31#define DMA_BUF_SYNC_START (0 << 2)
32#define DMA_BUF_SYNC_END (1 << 2)
33#define DMA_BUF_SYNC_VALID_FLAGS_MASK \
34 (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END)
35
36#define DMA_BUF_BASE 'b'
37#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
38#endif
39
21#include "linux-dmabuf-unstable-v1-client-protocol.h" 40#include "linux-dmabuf-unstable-v1-client-protocol.h"
22 41
23#define SYM(lib, xx) \ 42#define SYM(lib, xx) \