Added
Link Here
|
1 |
--- dma-buf-compat.h.orig 2024-08-27 18:15:44 UTC |
2 |
+++ dma-buf-compat.h |
3 |
@@ -0,0 +1,22 @@ |
4 |
+#ifdef __linux__ |
5 |
+#include <linux/dma-buf.h> |
6 |
+#else |
7 |
+typedef uint64_t __u64; |
8 |
+ |
9 |
+// From https://github.com/evadot/drm-subtree or https://reviews.freebsd.org/D23085 |
10 |
+struct dma_buf_sync |
11 |
+{ |
12 |
+ __u64 flags; |
13 |
+}; |
14 |
+ |
15 |
+#define DMA_BUF_SYNC_READ (1 << 0) |
16 |
+#define DMA_BUF_SYNC_WRITE (2 << 0) |
17 |
+#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE) |
18 |
+#define DMA_BUF_SYNC_START (0 << 2) |
19 |
+#define DMA_BUF_SYNC_END (1 << 2) |
20 |
+#define DMA_BUF_SYNC_VALID_FLAGS_MASK \ |
21 |
+ (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END) |
22 |
+ |
23 |
+#define DMA_BUF_BASE 'b' |
24 |
+#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync) |
25 |
+#endif |