blob: 5511a4ea930ad63e6ed3430f14b7bb9497fc9014 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
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 Ferris106b3a82016-08-24 12:15:38 -07007#ifndef _DMA_BUF_UAPI_H_
8#define _DMA_BUF_UAPI_H_
9#include <linux/types.h>
10struct dma_buf_sync {
Christopher Ferris106b3a82016-08-24 12:15:38 -070011 __u64 flags;
12};
13#define DMA_BUF_SYNC_READ (1 << 0)
14#define DMA_BUF_SYNC_WRITE (2 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -070015#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 Ferrisb8a95e22019-10-02 18:29:20 -070019#define DMA_BUF_NAME_LEN 32
Christopher Ferris7447a1c2022-10-04 18:24:44 -070020struct dma_buf_export_sync_file {
21 __u32 flags;
22 __s32 fd;
23};
24struct dma_buf_import_sync_file {
25 __u32 flags;
26 __s32 fd;
27};
Christopher Ferris106b3a82016-08-24 12:15:38 -070028#define DMA_BUF_BASE 'b'
29#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070030#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
Christopher Ferris10a76e62022-06-08 13:31:52 -070031#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 Ferris7447a1c2022-10-04 18:24:44 -070033#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 Ferris106b3a82016-08-24 12:15:38 -070035#endif