Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 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 | ****************************************************************************/ |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 19 | #ifndef _UAPI_LINUX_ION_H |
| 20 | #define _UAPI_LINUX_ION_H |
| 21 | #include <linux/ioctl.h> |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 22 | #include <linux/types.h> |
| 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 24 | typedef int ion_user_handle_t; |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 25 | enum ion_heap_type { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 26 | ION_HEAP_TYPE_SYSTEM, |
| 27 | ION_HEAP_TYPE_SYSTEM_CONTIG, |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | ION_HEAP_TYPE_CARVEOUT, |
| 30 | ION_HEAP_TYPE_CHUNK, |
| 31 | ION_HEAP_TYPE_DMA, |
| 32 | ION_HEAP_TYPE_CUSTOM, |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 34 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 35 | #define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 36 | #define ION_FLAG_CACHED 1 |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 37 | #define ION_FLAG_CACHED_NEEDS_SYNC 2 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 39 | struct ion_allocation_data { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 | size_t len; |
| 41 | size_t align; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 42 | unsigned int heap_id_mask; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 44 | unsigned int flags; |
| 45 | ion_user_handle_t handle; |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 46 | }; |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 47 | struct ion_fd_data { |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 49 | ion_user_handle_t handle; |
| 50 | int fd; |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 51 | }; |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 52 | struct ion_handle_data { |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 54 | ion_user_handle_t handle; |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 55 | }; |
| 56 | struct ion_custom_data { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 57 | unsigned int cmd; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | unsigned long arg; |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 60 | }; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 61 | #define MAX_HEAP_NAME 32 |
| 62 | struct ion_heap_data { |
Elliott Hughes | c43d16a | 2013-11-25 13:50:24 -0800 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 64 | char name[MAX_HEAP_NAME]; |
| 65 | __u32 type; |
| 66 | __u32 heap_id; |
| 67 | __u32 reserved0; |
| 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 69 | __u32 reserved1; |
| 70 | __u32 reserved2; |
| 71 | }; |
| 72 | struct ion_heap_query { |
| 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 74 | __u32 cnt; |
| 75 | __u32 reserved0; |
| 76 | __u64 heaps; |
| 77 | __u32 reserved1; |
| 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 79 | __u32 reserved2; |
| 80 | }; |
| 81 | #define ION_IOC_MAGIC 'I' |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 82 | #define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 84 | #define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) |
| 85 | #define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data) |
| 86 | #define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 87 | #define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 89 | #define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data) |
| 90 | #define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame^] | 91 | #define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, struct ion_heap_query) |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 92 | #endif |
Elliott Hughes | 356a4e4 | 2013-11-25 14:08:33 -0800 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |