diff options
Diffstat (limited to 'drivers/staging/android/uapi/ion.h')
-rw-r--r-- | drivers/staging/android/uapi/ion.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/staging/android/uapi/ion.h b/drivers/staging/android/uapi/ion.h index 14cd8738ecfc..61ea81472365 100644 --- a/drivers/staging/android/uapi/ion.h +++ b/drivers/staging/android/uapi/ion.h @@ -2,6 +2,7 @@ * drivers/staging/android/uapi/ion.h * * Copyright (C) 2011 Google, Inc. + * Copyright (C) 2016 Freescale Semiconductor, Inc. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -30,6 +31,8 @@ typedef int ion_user_handle_t; * carveout heap, allocations are physically * contiguous * @ION_HEAP_TYPE_DMA: memory allocated via DMA API + * @ION_HEAP_TYPE_UNMAPPED: memory not intended to be mapped into the + * linux address space unless for debug cases * @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask * is used to identify the heaps, so only 32 * total heap types are supported @@ -40,12 +43,14 @@ enum ion_heap_type { ION_HEAP_TYPE_CARVEOUT, ION_HEAP_TYPE_CHUNK, ION_HEAP_TYPE_DMA, + ION_HEAP_TYPE_UNMAPPED, ION_HEAP_TYPE_CUSTOM, /* * must be last so device specific heaps always * are at the end of this enum */ }; +#define ION_CMA_HEAP_ID 0 #define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) /** @@ -158,6 +163,23 @@ struct ion_heap_query { __u32 reserved2; }; +struct ion_phys_data { + ion_user_handle_t handle; + unsigned long phys; +}; + +struct ion_phys_dma_data { + unsigned long phys; + size_t size; + int dmafd; +}; + +struct ion_phys_virt_data { + unsigned long virt; + unsigned long phys; + size_t size; +}; + #define ION_IOC_MAGIC 'I' /** @@ -233,4 +255,10 @@ struct ion_heap_query { #define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, \ struct ion_heap_query) +#define ION_IOC_PHYS _IOWR(ION_IOC_MAGIC, 8, struct ion_phys_data) + +#define ION_IOC_PHYS_DMA _IOWR(ION_IOC_MAGIC, 9, struct ion_phys_dma_data) + +#define ION_IOC_PHYS_VIRT _IOWR(ION_IOC_MAGIC, 10, struct ion_phys_virt_data) + #endif /* _UAPI_LINUX_ION_H */ |