1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _BIGO_H_
20 #define _BIGO_H_
21 #include <linux/ioctl.h>
22 #include <linux/types.h>
23 struct bigo_ioc_regs {
24   __u64 regs;
25   __u32 regs_size;
26 };
27 struct bigo_ioc_mapping {
28   int fd;
29   __u32 iova;
30   __u32 offset;
31   __u32 size;
32 };
33 struct bigo_ioc_frmsize {
34   __u32 height;
35   __u32 width;
36 };
37 struct bigo_cache_info {
38   __u32 size;
39   __u32 pid;
40 };
41 #define BIGO_IOC_MAGIC 'B'
42 #define _BIGO_IO(nr) _IO(BIGO_IOC_MAGIC, nr)
43 #define _BIGO_IOR(nr,size) _IOR(BIGO_IOC_MAGIC, nr, size)
44 #define _BIGO_IOW(nr,size) _IOW(BIGO_IOC_MAGIC, nr, size)
45 #define _BIGO_IOWR(nr,size) _IOWR(BIGO_IOC_MAGIC, nr, size)
46 enum bigo_cmd_id {
47   BIGO_CMD_PROCESS,
48   BIGO_CMD_ABORT,
49   BIGO_CMD_MAP,
50   BIGO_CMD_UNMAP,
51   BIGO_CMD_CONFIG_FRMRATE,
52   BIGO_CMD_CONFIG_FRMSIZE,
53   BIGO_CMD_GET_CACHE_INFO,
54   BIGO_CMD_CONFIG_SECURE,
55   BIGO_CMD_CONFIG_PRIORITY,
56   BIGO_CMD_MAXNR,
57 };
58 #define BIGO_IOCX_PROCESS _BIGO_IOWR(BIGO_CMD_PROCESS, struct bigo_ioc_regs)
59 #define BIGO_IOCX_MAP _BIGO_IOWR(BIGO_CMD_MAP, struct bigo_ioc_mapping)
60 #define BIGO_IOCX_UNMAP _BIGO_IOW(BIGO_CMD_UNMAP, struct bigo_ioc_mapping)
61 #define BIGO_IOCX_CONFIG_FRMRATE _BIGO_IOW(BIGO_CMD_CONFIG_FRMRATE, __u32)
62 #define BIGO_IOCX_CONFIG_FRMSIZE _BIGO_IOW(BIGO_CMD_CONFIG_FRMSIZE, struct bigo_ioc_frmsize)
63 #define BIGO_IOCX_GET_CACHE_INFO _BIGO_IOR(BIGO_CMD_GET_CACHE_INFO, struct bigo_cache_info)
64 #define BIGO_IOCX_ABORT _BIGO_IO(BIGO_CMD_ABORT)
65 #define BIGO_IOCX_CONFIG_SECURE _BIGO_IOW(BIGO_CMD_CONFIG_SECURE, __u32)
66 #define BIGO_IOCX_CONFIG_PRIORITY _BIGO_IOW(BIGO_CMD_CONFIG_PRIORITY, __s32)
67 #endif
68