Merge remote-tracking branch 'staging/staging-next'
[deliverable/linux.git] / drivers / staging / android / uapi / ion.h
index 0a8e40f92cd70097e0d9c9d96908b04f6c1e4b7a..647f130c60af25dfd8d82edb995418a185dc4eee 100644 (file)
@@ -44,14 +44,8 @@ enum ion_heap_type {
                               * must be last so device specific heaps always
                               * are at the end of this enum
                               */
-       ION_NUM_HEAPS = 16,
 };
 
-#define ION_HEAP_SYSTEM_MASK           (1 << ION_HEAP_TYPE_SYSTEM)
-#define ION_HEAP_SYSTEM_CONTIG_MASK    (1 << ION_HEAP_TYPE_SYSTEM_CONTIG)
-#define ION_HEAP_CARVEOUT_MASK         (1 << ION_HEAP_TYPE_CARVEOUT)
-#define ION_HEAP_TYPE_DMA_MASK         (1 << ION_HEAP_TYPE_DMA)
-
 #define ION_NUM_HEAP_IDS               (sizeof(unsigned int) * 8)
 
 /**
@@ -134,6 +128,36 @@ struct ion_custom_data {
        unsigned long arg;
 };
 
+#define MAX_HEAP_NAME                  32
+
+/**
+ * struct ion_heap_data - data about a heap
+ * @name - first 32 characters of the heap name
+ * @type - heap type
+ * @heap_id - heap id for the heap
+ */
+struct ion_heap_data {
+       char name[MAX_HEAP_NAME];
+       __u32 type;
+       __u32 heap_id;
+       __u32 reserved0;
+       __u32 reserved1;
+       __u32 reserved2;
+};
+
+/**
+ * struct ion_heap_query - collection of data about all heaps
+ * @cnt - total number of heaps to be copied
+ * @heaps - buffer to copy heap data
+ */
+struct ion_heap_query {
+       __u32 cnt; /* Total number of heaps to be copied */
+       __u32 reserved0; /* align to 64bits */
+       __u64 heaps; /* buffer to be populated */
+       __u32 reserved1;
+       __u32 reserved2;
+};
+
 #define ION_IOC_MAGIC          'I'
 
 /**
@@ -200,4 +224,13 @@ struct ion_custom_data {
  */
 #define ION_IOC_CUSTOM         _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data)
 
+/**
+ * DOC: ION_IOC_HEAP_QUERY - information about available heaps
+ *
+ * Takes an ion_heap_query structure and populates information about
+ * available Ion heaps.
+ */
+#define ION_IOC_HEAP_QUERY     _IOWR(ION_IOC_MAGIC, 8, \
+                                       struct ion_heap_query)
+
 #endif /* _UAPI_LINUX_ION_H */
This page took 0.024959 seconds and 5 git commands to generate.