Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [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 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_ION_H |
| 20 | #define _LINUX_ION_H |
| 21 | #include <linux/types.h> |
| 22 | struct ion_handle; |
| 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 24 | enum ion_heap_type { |
| 25 | ION_HEAP_TYPE_SYSTEM, |
| 26 | ION_HEAP_TYPE_SYSTEM_CONTIG, |
| 27 | ION_HEAP_TYPE_CARVEOUT, |
| 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 29 | ION_HEAP_TYPE_CUSTOM, |
Rebecca Schultz Zavin | eb75db7 | 2012-08-23 16:29:23 -0700 | [diff] [blame] | 30 | ION_NUM_HEAPS = 16, |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 31 | }; |
Iliyan Malchev | 221595a | 2011-07-07 15:39:28 -0700 | [diff] [blame] | 32 | #define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM) |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Iliyan Malchev | 221595a | 2011-07-07 15:39:28 -0700 | [diff] [blame] | 34 | #define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG) |
| 35 | #define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT) |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 36 | #define ION_FLAG_CACHED 1 |
| 37 | #define ION_FLAG_CACHED_NEEDS_SYNC 2 |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Rebecca Schultz Zavin | a9dca77 | 2012-09-20 00:17:34 -0700 | [diff] [blame] | 39 | struct ion_allocation_data { |
Rebecca Schultz Zavin | 6d3f548 | 2012-06-11 14:12:57 -0700 | [diff] [blame] | 40 | size_t len; |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 41 | size_t align; |
Rebecca Schultz Zavin | 6d3f548 | 2012-06-11 14:12:57 -0700 | [diff] [blame] | 42 | unsigned int heap_mask; |
Rebecca Schultz Zavin | 6d3f548 | 2012-06-11 14:12:57 -0700 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Rebecca Schultz Zavin | a9dca77 | 2012-09-20 00:17:34 -0700 | [diff] [blame] | 44 | unsigned int flags; |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 45 | struct ion_handle *handle; |
| 46 | }; |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 47 | struct ion_fd_data { |
Rebecca Schultz Zavin | 6d3f548 | 2012-06-11 14:12:57 -0700 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Rebecca Schultz Zavin | a9dca77 | 2012-09-20 00:17:34 -0700 | [diff] [blame] | 49 | struct ion_handle *handle; |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 50 | int fd; |
| 51 | }; |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 52 | struct ion_handle_data { |
Rebecca Schultz Zavin | 6d3f548 | 2012-06-11 14:12:57 -0700 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Rebecca Schultz Zavin | a9dca77 | 2012-09-20 00:17:34 -0700 | [diff] [blame] | 54 | struct ion_handle *handle; |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 55 | }; |
| 56 | struct ion_custom_data { |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 57 | unsigned int cmd; |
Rebecca Schultz Zavin | 6d3f548 | 2012-06-11 14:12:57 -0700 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Rebecca Schultz Zavin | a9dca77 | 2012-09-20 00:17:34 -0700 | [diff] [blame] | 59 | unsigned long arg; |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 60 | }; |
| 61 | #define ION_IOC_MAGIC 'I' |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 62 | #define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data) |
Rebecca Schultz Zavin | 6d3f548 | 2012-06-11 14:12:57 -0700 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Rebecca Schultz Zavin | a9dca77 | 2012-09-20 00:17:34 -0700 | [diff] [blame] | 64 | #define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 65 | #define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data) |
| 66 | #define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) |
Rebecca Schultz Zavin | eb75db7 | 2012-08-23 16:29:23 -0700 | [diff] [blame] | 67 | #define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data) |
Rebecca Schultz Zavin | 6d3f548 | 2012-06-11 14:12:57 -0700 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Rebecca Schultz Zavin | a9dca77 | 2012-09-20 00:17:34 -0700 | [diff] [blame] | 69 | #define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data) |
Rebecca Schultz Zavin | eb75db7 | 2012-08-23 16:29:23 -0700 | [diff] [blame] | 70 | #define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data) |
Rebecca Schultz Zavin | 1079eb1 | 2011-06-30 14:16:17 -0700 | [diff] [blame] | 71 | #endif |