diff options
Diffstat (limited to 'include/linux/agpgart.h')
-rw-r--r-- | include/linux/agpgart.h | 86 |
1 files changed, 1 insertions, 85 deletions
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index f6778eceb8f..c6b61ca9705 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h | |||
@@ -23,94 +23,12 @@ | |||
23 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 23 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | |||
27 | #ifndef _AGP_H | 26 | #ifndef _AGP_H |
28 | #define _AGP_H 1 | 27 | #define _AGP_H 1 |
29 | 28 | ||
30 | #define AGPIOC_BASE 'A' | ||
31 | #define AGPIOC_INFO _IOR (AGPIOC_BASE, 0, struct agp_info*) | ||
32 | #define AGPIOC_ACQUIRE _IO (AGPIOC_BASE, 1) | ||
33 | #define AGPIOC_RELEASE _IO (AGPIOC_BASE, 2) | ||
34 | #define AGPIOC_SETUP _IOW (AGPIOC_BASE, 3, struct agp_setup*) | ||
35 | #define AGPIOC_RESERVE _IOW (AGPIOC_BASE, 4, struct agp_region*) | ||
36 | #define AGPIOC_PROTECT _IOW (AGPIOC_BASE, 5, struct agp_region*) | ||
37 | #define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 6, struct agp_allocate*) | ||
38 | #define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int) | ||
39 | #define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, struct agp_bind*) | ||
40 | #define AGPIOC_UNBIND _IOW (AGPIOC_BASE, 9, struct agp_unbind*) | ||
41 | #define AGPIOC_CHIPSET_FLUSH _IO (AGPIOC_BASE, 10) | ||
42 | |||
43 | #define AGP_DEVICE "/dev/agpgart" | ||
44 | |||
45 | #ifndef TRUE | ||
46 | #define TRUE 1 | ||
47 | #endif | ||
48 | |||
49 | #ifndef FALSE | ||
50 | #define FALSE 0 | ||
51 | #endif | ||
52 | |||
53 | #ifndef __KERNEL__ | ||
54 | #include <linux/types.h> | ||
55 | |||
56 | struct agp_version { | ||
57 | __u16 major; | ||
58 | __u16 minor; | ||
59 | }; | ||
60 | |||
61 | typedef struct _agp_info { | ||
62 | struct agp_version version; /* version of the driver */ | ||
63 | __u32 bridge_id; /* bridge vendor/device */ | ||
64 | __u32 agp_mode; /* mode info of bridge */ | ||
65 | unsigned long aper_base;/* base of aperture */ | ||
66 | size_t aper_size; /* size of aperture */ | ||
67 | size_t pg_total; /* max pages (swap + system) */ | ||
68 | size_t pg_system; /* max pages (system) */ | ||
69 | size_t pg_used; /* current pages used */ | ||
70 | } agp_info; | ||
71 | |||
72 | typedef struct _agp_setup { | ||
73 | __u32 agp_mode; /* mode info of bridge */ | ||
74 | } agp_setup; | ||
75 | |||
76 | /* | ||
77 | * The "prot" down below needs still a "sleep" flag somehow ... | ||
78 | */ | ||
79 | typedef struct _agp_segment { | ||
80 | __kernel_off_t pg_start; /* starting page to populate */ | ||
81 | __kernel_size_t pg_count; /* number of pages */ | ||
82 | int prot; /* prot flags for mmap */ | ||
83 | } agp_segment; | ||
84 | |||
85 | typedef struct _agp_region { | ||
86 | __kernel_pid_t pid; /* pid of process */ | ||
87 | __kernel_size_t seg_count; /* number of segments */ | ||
88 | struct _agp_segment *seg_list; | ||
89 | } agp_region; | ||
90 | |||
91 | typedef struct _agp_allocate { | ||
92 | int key; /* tag of allocation */ | ||
93 | __kernel_size_t pg_count;/* number of pages */ | ||
94 | __u32 type; /* 0 == normal, other devspec */ | ||
95 | __u32 physical; /* device specific (some devices | ||
96 | * need a phys address of the | ||
97 | * actual page behind the gatt | ||
98 | * table) */ | ||
99 | } agp_allocate; | ||
100 | |||
101 | typedef struct _agp_bind { | ||
102 | int key; /* tag of allocation */ | ||
103 | __kernel_off_t pg_start;/* starting page to populate */ | ||
104 | } agp_bind; | ||
105 | |||
106 | typedef struct _agp_unbind { | ||
107 | int key; /* tag of allocation */ | ||
108 | __u32 priority; /* priority for paging out */ | ||
109 | } agp_unbind; | ||
110 | |||
111 | #else /* __KERNEL__ */ | ||
112 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
113 | #include <linux/agp_backend.h> | 30 | #include <linux/agp_backend.h> |
31 | #include <uapi/linux/agpgart.h> | ||
114 | 32 | ||
115 | #define AGPGART_MINOR 175 | 33 | #define AGPGART_MINOR 175 |
116 | 34 | ||
@@ -209,6 +127,4 @@ struct agp_front_data { | |||
209 | bool backend_acquired; | 127 | bool backend_acquired; |
210 | }; | 128 | }; |
211 | 129 | ||
212 | #endif /* __KERNEL__ */ | ||
213 | |||
214 | #endif /* _AGP_H */ | 130 | #endif /* _AGP_H */ |