OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / prebuilt / ndk / android-ndk-r4 / platforms / android-3 / arch-arm / usr / include / linux / android_pmem.h
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  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _ANDROID_PMEM_H_
13 #define _ANDROID_PMEM_H_
14
15 #include <stdint.h>
16
17 #ifndef __user
18 #define __user
19 #endif
20
21 struct pmem_region {
22  unsigned long offset;
23  unsigned long len;
24 };
25
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 *)
31
32 #define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int)
33
34 #define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int)
35
36 #define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, struct pmem_region *)
37
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)
41
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);
49 };
50
51 #endif
52