1 /****************************************************************************
2 ****************************************************************************
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.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _ANDROID_PMEM_H_
13 #define _ANDROID_PMEM_H_
26 #define PMEM_IOCTL_MAGIC 'p'
27 #define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, struct pmem_region *)
28 #define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, struct pmem_region *)
29 #define PMEM_GET_SIZE _IOW(PMEM_IOCTL_MAGIC, 3, struct pmem_region *)
30 #define PMEM_UNMAP _IOW(PMEM_IOCTL_MAGIC, 4, struct pmem_region *)
32 #define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int)
34 #define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int)
36 #define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, struct pmem_region *)
38 #define HW3D_REVOKE_GPU _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
39 #define HW3D_GRANT_GPU _IOW(PMEM_IOCTL_MAGIC, 9, unsigned int)
40 #define HW3D_WAIT_IRQ _IOW(PMEM_IOCTL_MAGIC,10, unsigned int)
42 struct android_pmem_platform_data;
43 struct pmem_file_operations {
44 int (*mmap) (struct file *, struct vm_area_struct *);
45 int (*open) (struct inode *, struct file *);
46 ssize_t (*read) (struct file *, char __user *, size_t, long long *);
47 int (*release) (struct inode *, struct file *);
48 long (*ioctl) (struct file *, unsigned int, unsigned long);