xref: /aosp_15_r20/bionic/libc/kernel/uapi/linux/dma-buf.h (revision 8d67ca893c1523eb926b9080dbe4e2ffd2a27ba1)
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _DMA_BUF_UAPI_H_
8 #define _DMA_BUF_UAPI_H_
9 #include <linux/types.h>
10 struct dma_buf_sync {
11   __u64 flags;
12 };
13 #define DMA_BUF_SYNC_READ (1 << 0)
14 #define DMA_BUF_SYNC_WRITE (2 << 0)
15 #define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE)
16 #define DMA_BUF_SYNC_START (0 << 2)
17 #define DMA_BUF_SYNC_END (1 << 2)
18 #define DMA_BUF_SYNC_VALID_FLAGS_MASK (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END)
19 #define DMA_BUF_NAME_LEN 32
20 struct dma_buf_export_sync_file {
21   __u32 flags;
22   __s32 fd;
23 };
24 struct dma_buf_import_sync_file {
25   __u32 flags;
26   __s32 fd;
27 };
28 #define DMA_BUF_BASE 'b'
29 #define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
30 #define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
31 #define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, __u32)
32 #define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, __u64)
33 #define DMA_BUF_IOCTL_EXPORT_SYNC_FILE _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file)
34 #define DMA_BUF_IOCTL_IMPORT_SYNC_FILE _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file)
35 #endif
36