blob: f18939d1165b6e35beaac26ad00c8d8a88f4bce2 [file] [log] [blame]
Elliott Hughes8cb52b02013-11-21 13:43:23 -08001/****************************************************************************
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 Hughesc43d16a2013-11-25 13:50:24 -080019#ifndef _LINUX_ION_H
20#define _LINUX_ION_H
Elliott Hughes8cb52b02013-11-21 13:43:23 -080021#include <linux/types.h>
Elliott Hughesc43d16a2013-11-25 13:50:24 -080022struct ion_handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -080024enum ion_heap_type {
25 ION_HEAP_TYPE_SYSTEM,
26 ION_HEAP_TYPE_SYSTEM_CONTIG,
Elliott Hughes8cb52b02013-11-21 13:43:23 -080027 ION_HEAP_TYPE_CARVEOUT,
Elliott Hughes8cb52b02013-11-21 13:43:23 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesc43d16a2013-11-25 13:50:24 -080029 ION_HEAP_TYPE_CUSTOM,
Elliott Hughes8cb52b02013-11-21 13:43:23 -080030 ION_NUM_HEAPS = 16,
31};
32#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
Elliott Hughesc43d16a2013-11-25 13:50:24 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -080034#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
Elliott Hughes8cb52b02013-11-21 13:43:23 -080035#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
Elliott Hughes8cb52b02013-11-21 13:43:23 -080036#define ION_FLAG_CACHED 1
Elliott Hughes8cb52b02013-11-21 13:43:23 -080037#define ION_FLAG_CACHED_NEEDS_SYNC 2
Elliott Hughesc43d16a2013-11-25 13:50:24 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -080039struct ion_allocation_data {
40 size_t len;
41 size_t align;
Elliott Hughesc43d16a2013-11-25 13:50:24 -080042 unsigned int heap_mask;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -080044 unsigned int flags;
Elliott Hughesc43d16a2013-11-25 13:50:24 -080045 struct ion_handle *handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080046};
Elliott Hughes8cb52b02013-11-21 13:43:23 -080047struct ion_fd_data {
Elliott Hughesc43d16a2013-11-25 13:50:24 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 struct ion_handle *handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080050 int fd;
51};
Elliott Hughes8cb52b02013-11-21 13:43:23 -080052struct ion_handle_data {
Elliott Hughesc43d16a2013-11-25 13:50:24 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 struct ion_handle *handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080055};
56struct ion_custom_data {
Elliott Hughes8cb52b02013-11-21 13:43:23 -080057 unsigned int cmd;
Elliott Hughesc43d16a2013-11-25 13:50:24 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -080059 unsigned long arg;
60};
61#define ION_IOC_MAGIC 'I'
Elliott Hughes8cb52b02013-11-21 13:43:23 -080062#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
Elliott Hughesc43d16a2013-11-25 13:50:24 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -080064#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
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)
Elliott Hughes8cb52b02013-11-21 13:43:23 -080067#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
Elliott Hughesc43d16a2013-11-25 13:50:24 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes8cb52b02013-11-21 13:43:23 -080069#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
70#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
71#endif