ion.h revision 82d7504cd7d5c8d2175fb3b1a4ee3518cad6aa0f
18cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes/****************************************************************************
28cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ****************************************************************************
38cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***
48cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   This header was automatically generated from a Linux kernel header
58cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   of the same name, to make information necessary for userspace to
68cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   call into the kernel available to libc.  It contains only constants,
78cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   structures, and macros generated from the original header, and thus,
88cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   contains no copyrightable information.
98cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***
108cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   To edit the content of this header, modify the corresponding
118cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   source file (e.g. under external/kernel-headers/original/) then
128cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   run bionic/libc/kernel/tools/update_all.py
138cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***
148cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   Any manual change here will be lost the next time this script will
158cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***   be run. You've been warned!
168cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ***
178cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ****************************************************************************
188cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ****************************************************************************/
19356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes#ifndef _UAPI_LINUX_ION_H
20356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes#define _UAPI_LINUX_ION_H
21356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes#include <linux/ioctl.h>
228cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#include <linux/types.h>
238cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughestypedef int ion_user_handle_t;
258cb52b056cfc302e05304d847c4228dff15715cfElliott Hughesenum ion_heap_type {
268cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ION_HEAP_TYPE_SYSTEM,
278cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ION_HEAP_TYPE_SYSTEM_CONTIG,
288cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes ION_HEAP_TYPE_CARVEOUT,
30356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes ION_HEAP_TYPE_CHUNK,
31356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes ION_HEAP_TYPE_DMA,
32c43d16a4581038422425b9b36bf95612d0383941Elliott Hughes ION_HEAP_TYPE_CUSTOM,
33356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
348cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes ION_NUM_HEAPS = 16,
358cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes};
368cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM)
37c43d16a4581038422425b9b36bf95612d0383941Elliott Hughes#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
38356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
398cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT)
40356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes#define ION_HEAP_TYPE_DMA_MASK (1 << ION_HEAP_TYPE_DMA)
4182d7504cd7d5c8d2175fb3b1a4ee3518cad6aa0fChristopher Ferris#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8)
428cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_FLAG_CACHED 1
43c43d16a4581038422425b9b36bf95612d0383941Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes#define ION_FLAG_CACHED_NEEDS_SYNC 2
458cb52b056cfc302e05304d847c4228dff15715cfElliott Hughesstruct ion_allocation_data {
468cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes size_t len;
478cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes size_t align;
488cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes unsigned int heap_id_mask;
508cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes unsigned int flags;
51356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes ion_user_handle_t handle;
528cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes};
53c43d16a4581038422425b9b36bf95612d0383941Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughesstruct ion_fd_data {
55356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes ion_user_handle_t handle;
568cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes int fd;
578cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes};
58c43d16a4581038422425b9b36bf95612d0383941Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughesstruct ion_handle_data {
60356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes ion_user_handle_t handle;
618cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes};
628cb52b056cfc302e05304d847c4228dff15715cfElliott Hughesstruct ion_custom_data {
63c43d16a4581038422425b9b36bf95612d0383941Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes unsigned int cmd;
658cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes unsigned long arg;
668cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes};
678cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_IOC_MAGIC 'I'
68c43d16a4581038422425b9b36bf95612d0383941Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0,   struct ion_allocation_data)
708cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data)
718cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data)
728cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data)
73c43d16a4581038422425b9b36bf95612d0383941Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data)
758cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data)
768cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
778cb52b056cfc302e05304d847c4228dff15715cfElliott Hughes#endif
78356a4e4a3243ddb40c41a9bbaf7e86f821aaa912Elliott Hughes/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79