blob: 41937635ab4e9ccb7039fe688873df466326ef96 [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 Hughes356a4e42013-11-25 14:08:33 -080019#ifndef _UAPI_LINUX_ION_H
20#define _UAPI_LINUX_ION_H
21#include <linux/ioctl.h>
Elliott Hughes8cb52b02013-11-21 13:43:23 -080022#include <linux/types.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes356a4e42013-11-25 14:08:33 -080024typedef int ion_user_handle_t;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080025enum ion_heap_type {
Tao Baod7db5942015-01-28 10:07:51 -080026 ION_HEAP_TYPE_SYSTEM,
27 ION_HEAP_TYPE_SYSTEM_CONTIG,
Elliott Hughes8cb52b02013-11-21 13:43:23 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 ION_HEAP_TYPE_CARVEOUT,
30 ION_HEAP_TYPE_CHUNK,
31 ION_HEAP_TYPE_DMA,
32 ION_HEAP_TYPE_CUSTOM,
Elliott Hughes356a4e42013-11-25 14:08:33 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 ION_NUM_HEAPS = 16,
Elliott Hughes8cb52b02013-11-21 13:43:23 -080035};
36#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
37#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
Elliott Hughesc43d16a2013-11-25 13:50:24 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes356a4e42013-11-25 14:08:33 -080039#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
40#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA)
Christopher Ferris82d75042015-01-26 10:57:07 -080041#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8)
Elliott Hughes356a4e42013-11-25 14:08:33 -080042#define ION_FLAG_CACHED 1
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define ION_FLAG_CACHED_NEEDS_SYNC 2
Elliott Hughes8cb52b02013-11-21 13:43:23 -080045struct ion_allocation_data {
Tao Baod7db5942015-01-28 10:07:51 -080046 size_t len;
47 size_t align;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049 unsigned int heap_id_mask;
50 unsigned int flags;
51 ion_user_handle_t handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080052};
Elliott Hughesc43d16a2013-11-25 13:50:24 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes356a4e42013-11-25 14:08:33 -080054struct ion_fd_data {
Tao Baod7db5942015-01-28 10:07:51 -080055 ion_user_handle_t handle;
56 int fd;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080057};
Elliott Hughesc43d16a2013-11-25 13:50:24 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes356a4e42013-11-25 14:08:33 -080059struct ion_handle_data {
Tao Baod7db5942015-01-28 10:07:51 -080060 ion_user_handle_t handle;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080061};
62struct ion_custom_data {
Elliott Hughesc43d16a2013-11-25 13:50:24 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 unsigned int cmd;
65 unsigned long arg;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080066};
67#define ION_IOC_MAGIC 'I'
Elliott Hughesc43d16a2013-11-25 13:50:24 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data)
Elliott Hughes8cb52b02013-11-21 13:43:23 -080070#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
71#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
72#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
Elliott Hughesc43d16a2013-11-25 13:50:24 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughes356a4e42013-11-25 14:08:33 -080074#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
Elliott Hughes8cb52b02013-11-21 13:43:23 -080075#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
76#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
77#endif
Elliott Hughes356a4e42013-11-25 14:08:33 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */