Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame^] | 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 | */ |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 7 | #ifndef _DMA_BUF_UAPI_H_ |
| 8 | #define _DMA_BUF_UAPI_H_ |
| 9 | #include <linux/types.h> |
| 10 | struct dma_buf_sync { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 11 | __u64 flags; |
| 12 | }; |
| 13 | #define DMA_BUF_SYNC_READ (1 << 0) |
| 14 | #define DMA_BUF_SYNC_WRITE (2 << 0) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 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) |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 19 | #define DMA_BUF_NAME_LEN 32 |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 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 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 28 | #define DMA_BUF_BASE 'b' |
| 29 | #define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync) |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 30 | #define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *) |
Christopher Ferris | 10a76e6 | 2022-06-08 13:31:52 -0700 | [diff] [blame] | 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) |
Christopher Ferris | 7447a1c | 2022-10-04 18:24:44 -0700 | [diff] [blame] | 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) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 35 | #endif |