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 _BIGO_H_
8 #define _BIGO_H_
9 #include <linux/ioctl.h>
10 #include <linux/types.h>
11 struct bigo_ioc_regs {
12   __u64 regs;
13   __u32 regs_size;
14 };
15 struct bigo_ioc_mapping {
16   int fd;
17   __u32 iova;
18   __u32 offset;
19   __u32 size;
20   __u32 skip_cmo;
21 };
22 struct bigo_ioc_frmsize {
23   __u32 height;
24   __u32 width;
25 };
26 struct bigo_ioc_misc {
27   __u32 cmd;
28   __u32 ret;
29   __u32 data0;
30   __u32 data1;
31   __u32 data2;
32   __u32 data3;
33 };
34 struct bigo_cache_info {
35   __u32 size;
36   __u32 pid;
37 };
38 struct bigo_buf_sync {
39   int fd;
40   __u32 offset;
41   __u32 size;
42   __u64 flags;
43 };
44 #define BIGO_IOC_MAGIC 'B'
45 #define _BIGO_IO(nr) _IO(BIGO_IOC_MAGIC, nr)
46 #define _BIGO_IOR(nr,size) _IOR(BIGO_IOC_MAGIC, nr, size)
47 #define _BIGO_IOW(nr,size) _IOW(BIGO_IOC_MAGIC, nr, size)
48 #define _BIGO_IOWR(nr,size) _IOWR(BIGO_IOC_MAGIC, nr, size)
49 enum bigo_cmd_id {
50   BIGO_CMD_PROCESS,
51   BIGO_CMD_ABORT,
52   BIGO_CMD_MAP,
53   BIGO_CMD_UNMAP,
54   BIGO_CMD_CONFIG_FRMRATE,
55   BIGO_CMD_CONFIG_FRMSIZE,
56   BIGO_CMD_GET_CACHE_INFO,
57   BIGO_CMD_CONFIG_SECURE,
58   BIGO_CMD_CONFIG_PRIORITY,
59   BIGO_CMD_DMA_SYNC,
60   BIGO_CMD_MISC,
61   BIGO_CMD_MAXNR,
62 };
63 #define BIGO_IOCX_PROCESS _BIGO_IOWR(BIGO_CMD_PROCESS, struct bigo_ioc_regs)
64 #define BIGO_IOCX_MAP _BIGO_IOWR(BIGO_CMD_MAP, struct bigo_ioc_mapping)
65 #define BIGO_IOCX_UNMAP _BIGO_IOW(BIGO_CMD_UNMAP, struct bigo_ioc_mapping)
66 #define BIGO_IOCX_CONFIG_FRMRATE _BIGO_IOW(BIGO_CMD_CONFIG_FRMRATE, __u32)
67 #define BIGO_IOCX_CONFIG_FRMSIZE _BIGO_IOW(BIGO_CMD_CONFIG_FRMSIZE, struct bigo_ioc_frmsize)
68 #define BIGO_IOCX_GET_CACHE_INFO _BIGO_IOR(BIGO_CMD_GET_CACHE_INFO, struct bigo_cache_info)
69 #define BIGO_IOCX_ABORT _BIGO_IO(BIGO_CMD_ABORT)
70 #define BIGO_IOCX_CONFIG_SECURE _BIGO_IOW(BIGO_CMD_CONFIG_SECURE, __u32)
71 #define BIGO_IOCX_CONFIG_PRIORITY _BIGO_IOW(BIGO_CMD_CONFIG_PRIORITY, __s32)
72 #define BIGO_IOCX_DMA_SYNC _BIGO_IOW(BIGO_CMD_DMA_SYNC, struct bigo_buf_sync)
73 #define BIGO_IOCX_MISC _BIGO_IOW(BIGO_CMD_MISC, struct bigo_ioc_misc)
74 #endif
75