ion drivers: add 'query client infomation' interface for vpu
[firefly-linux-kernel-4.4.55.git] / include / linux / ion.h
index 202766b7d0e5b319306fb100dcb198b3e005eafc..1063072b28fb21229fd2644c343c5d3d5996953d 100755 (executable)
@@ -312,6 +312,16 @@ struct ion_flush_data {
        void *virt;
        size_t size;
 };
+struct ion_client_data {
+#define ION_TYPE_GET_TOTAL_SIZE  0
+#define ION_TYPE_SIZE_GET_COUNT  1
+        unsigned int type;
+        union {
+                size_t size;
+                size_t total_size;
+        };
+        unsigned int count;
+};
 #define ION_IOC_MAGIC          'I'
 
 /**
@@ -371,4 +381,5 @@ struct ion_flush_data {
 #define ION_CACHE_CLEAN                _IOWR(ION_IOC_MAGIC, 8, struct ion_flush_data)
 #define ION_CACHE_INVALID      _IOWR(ION_IOC_MAGIC, 9, struct ion_flush_data)
 #define ION_GET_PHYS           _IOWR(ION_IOC_MAGIC, 10, unsigned long)
+#define ION_GET_CLIENT         _IOWR(ION_IOC_MAGIC, 11, struct ion_client_data)
 #endif /* _LINUX_ION_H */