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 _UAPI_MSM_ION_H 20#define _UAPI_MSM_ION_H 21#include "../../../bionic/libc/kernel/uapi/linux/ion.h" 22enum msm_ion_heap_types { 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 ION_HEAP_TYPE_MSM_START = ION_HEAP_TYPE_CUSTOM + 1, 25 ION_HEAP_TYPE_SECURE_DMA = ION_HEAP_TYPE_MSM_START, 26 ION_HEAP_TYPE_REMOVED, 27}; 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29enum ion_heap_ids { 30 INVALID_HEAP_ID = -1, 31 ION_CP_MM_HEAP_ID = 8, 32 ION_CP_MFC_HEAP_ID = 12, 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 ION_CP_WB_HEAP_ID = 16, 35 ION_CAMERA_HEAP_ID = 20, 36 ION_SYSTEM_CONTIG_HEAP_ID = 21, 37 ION_ADSP_HEAP_ID = 22, 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 ION_PIL1_HEAP_ID = 23, 40 ION_SF_HEAP_ID = 24, 41 ION_SYSTEM_HEAP_ID = 25, 42 ION_PIL2_HEAP_ID = 26, 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 ION_QSECOM_HEAP_ID = 27, 45 ION_AUDIO_HEAP_ID = 28, 46 ION_MM_FIRMWARE_HEAP_ID = 29, 47 ION_HEAP_ID_RESERVED = 31 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49}; 50#define ION_IOMMU_HEAP_ID ION_SYSTEM_HEAP_ID 51#define ION_HEAP_TYPE_IOMMU ION_HEAP_TYPE_SYSTEM 52enum ion_fixed_position { 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 NOT_FIXED, 55 FIXED_LOW, 56 FIXED_MIDDLE, 57 FIXED_HIGH, 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59}; 60enum cp_mem_usage { 61 VIDEO_BITSTREAM = 0x1, 62 VIDEO_PIXEL = 0x2, 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 VIDEO_NONPIXEL = 0x3, 65 DISPLAY_SECURE_CP_USAGE = 0x4, 66 CAMERA_SECURE_CP_USAGE = 0x5, 67 MAX_USAGE = 0x6, 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 UNKNOWN = 0x7FFFFFFF, 70}; 71#define ION_FLAG_ALLOW_NON_CONTIG (1 << 24) 72#define ION_FLAG_SECURE (1 << ION_HEAP_ID_RESERVED) 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74#define ION_FLAG_FORCE_CONTIGUOUS (1 << 30) 75#define ION_FLAG_POOL_FORCE_ALLOC (1 << 16) 76#define ION_SECURE ION_FLAG_SECURE 77#define ION_FORCE_CONTIGUOUS ION_FLAG_FORCE_CONTIGUOUS 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79#define ION_HEAP(bit) (1 << (bit)) 80#define ION_ADSP_HEAP_NAME "adsp" 81#define ION_SYSTEM_HEAP_NAME "system" 82#define ION_VMALLOC_HEAP_NAME ION_SYSTEM_HEAP_NAME 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84#define ION_KMALLOC_HEAP_NAME "kmalloc" 85#define ION_AUDIO_HEAP_NAME "audio" 86#define ION_SF_HEAP_NAME "sf" 87#define ION_MM_HEAP_NAME "mm" 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89#define ION_CAMERA_HEAP_NAME "camera_preview" 90#define ION_IOMMU_HEAP_NAME "iommu" 91#define ION_MFC_HEAP_NAME "mfc" 92#define ION_WB_HEAP_NAME "wb" 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94#define ION_MM_FIRMWARE_HEAP_NAME "mm_fw" 95#define ION_PIL1_HEAP_NAME "pil_1" 96#define ION_PIL2_HEAP_NAME "pil_2" 97#define ION_QSECOM_HEAP_NAME "qsecom" 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99#define ION_SET_CACHED(__cache) (__cache | ION_FLAG_CACHED) 100#define ION_SET_UNCACHED(__cache) (__cache & ~ION_FLAG_CACHED) 101#define ION_IS_CACHED(__flags) ((__flags) & ION_FLAG_CACHED) 102struct ion_flush_data { 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 ion_user_handle_t handle; 105 int fd; 106 void *vaddr; 107 unsigned int offset; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 unsigned int length; 110}; 111struct ion_prefetch_data { 112 int heap_id; 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 unsigned long len; 115}; 116#define ION_IOC_MSM_MAGIC 'M' 117#define ION_IOC_CLEAN_CACHES _IOWR(ION_IOC_MSM_MAGIC, 0, struct ion_flush_data) 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119#define ION_IOC_INV_CACHES _IOWR(ION_IOC_MSM_MAGIC, 1, struct ion_flush_data) 120#define ION_IOC_CLEAN_INV_CACHES _IOWR(ION_IOC_MSM_MAGIC, 2, struct ion_flush_data) 121#define ION_IOC_PREFETCH _IOWR(ION_IOC_MSM_MAGIC, 3, struct ion_prefetch_data) 122#define ION_IOC_DRAIN _IOWR(ION_IOC_MSM_MAGIC, 4, struct ion_prefetch_data) 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124#endif 125 126