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_MSM_ION_H__ 20 #define __LINUX_MSM_ION_H__ 21 #include <linux/ion.h> 22 enum msm_ion_heap_types { 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 ION_HEAP_TYPE_IOMMU = ION_HEAP_TYPE_CUSTOM + 1, 25 ION_HEAP_TYPE_CP = ION_HEAP_TYPE_CUSTOM + 2, 26 }; 27 enum ion_heap_ids { 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 INVALID_HEAP_ID = -1, 30 ION_CP_MM_HEAP_ID = 8, 31 ION_CP_MFC_HEAP_ID = 12, 32 ION_CP_WB_HEAP_ID = 16, 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 ION_CAMERA_HEAP_ID = 20, 35 ION_SF_HEAP_ID = 24, 36 ION_IOMMU_HEAP_ID = 25, 37 ION_QSECOM_HEAP_ID = 27, 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 ION_AUDIO_HEAP_ID = 28, 40 ION_MM_FIRMWARE_HEAP_ID = 29, 41 ION_SYSTEM_HEAP_ID = 30, 42 ION_HEAP_ID_RESERVED = 31 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 }; 45 enum ion_fixed_position { 46 NOT_FIXED, 47 FIXED_LOW, 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 FIXED_MIDDLE, 50 FIXED_HIGH, 51 }; 52 enum cp_mem_usage { 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 VIDEO_BITSTREAM = 0x1, 55 VIDEO_PIXEL = 0x2, 56 VIDEO_NONPIXEL = 0x3, 57 MAX_USAGE = 0x4, 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 UNKNOWN = 0x7FFFFFFF, 60 }; 61 #define ION_HEAP_CP_MASK (1 << ION_HEAP_TYPE_CP) 62 #define ION_SECURE (1 << ION_HEAP_ID_RESERVED) 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define ION_HEAP(bit) (1 << (bit)) 65 #define ION_VMALLOC_HEAP_NAME "vmalloc" 66 #define ION_AUDIO_HEAP_NAME "audio" 67 #define ION_SF_HEAP_NAME "sf" 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #define ION_MM_HEAP_NAME "mm" 70 #define ION_CAMERA_HEAP_NAME "camera_preview" 71 #define ION_IOMMU_HEAP_NAME "iommu" 72 #define ION_MFC_HEAP_NAME "mfc" 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define ION_WB_HEAP_NAME "wb" 75 #define ION_MM_FIRMWARE_HEAP_NAME "mm_fw" 76 #define ION_QSECOM_HEAP_NAME "qsecom" 77 #define ION_FMEM_HEAP_NAME "fmem" 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #define CACHED 1 80 #define UNCACHED 0 81 #define ION_CACHE_SHIFT 0 82 #define ION_SET_CACHE(__cache) ((__cache) << ION_CACHE_SHIFT) 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 #define ION_IS_CACHED(__flags) ((__flags) & (1 << ION_CACHE_SHIFT)) 85 struct ion_flush_data { 86 struct ion_handle *handle; 87 int fd; 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 void *vaddr; 90 unsigned int offset; 91 unsigned int length; 92 }; 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 struct ion_flag_data { 95 struct ion_handle *handle; 96 unsigned long flags; 97 }; 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 #define ION_IOC_CLEAN_CACHES _IOWR(ION_IOC_MAGIC, 20, struct ion_flush_data) 100 #define ION_IOC_INV_CACHES _IOWR(ION_IOC_MAGIC, 21, struct ion_flush_data) 101 #define ION_IOC_CLEAN_INV_CACHES _IOWR(ION_IOC_MAGIC, 22, struct ion_flush_data) 102 #define ION_IOC_GET_FLAGS _IOWR(ION_IOC_MAGIC, 23, struct ion_flag_data) 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 #endif 105 106