blob: 0f872ec0c3544cb9168ec057af0cc4de4969c35e [file] [log] [blame]
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -07001/****************************************************************************
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>
22struct ion_handle;
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24enum 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,
30 ION_NUM_HEAPS,
31};
Iliyan Malchev221595a2011-07-07 15:39:28 -070032#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Iliyan Malchev221595a2011-07-07 15:39:28 -070034#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
35#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070036#define ION_FLAG_CACHED 1
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070037struct ion_allocation_data {
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070039 size_t len;
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070040 size_t align;
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070041 unsigned int heap_mask;
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070042 unsigned int flags;
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070044 struct ion_handle *handle;
45};
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070046struct ion_fd_data {
47 struct ion_handle *handle;
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070049 int fd;
50};
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070051struct ion_handle_data {
52 struct ion_handle *handle;
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070054};
55struct ion_custom_data {
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070056 unsigned int cmd;
57 unsigned long arg;
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070059};
60#define ION_IOC_MAGIC 'I'
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070061#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
62#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070064#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
65#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070066#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, int)
67#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Rebecca Schultz Zavin1079eb12011-06-30 14:16:17 -070069#endif
Rebecca Schultz Zavin6d3f5482012-06-11 14:12:57 -070070