1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26#ifndef _AGP_COMPAT_IOCTL_H
27#define _AGP_COMPAT_IOCTL_H
28
29#include <linux/compat.h>
30#include <linux/agpgart.h>
31
32#define AGPIOC_INFO32 _IOR (AGPIOC_BASE, 0, compat_uptr_t)
33#define AGPIOC_ACQUIRE32 _IO (AGPIOC_BASE, 1)
34#define AGPIOC_RELEASE32 _IO (AGPIOC_BASE, 2)
35#define AGPIOC_SETUP32 _IOW (AGPIOC_BASE, 3, compat_uptr_t)
36#define AGPIOC_RESERVE32 _IOW (AGPIOC_BASE, 4, compat_uptr_t)
37#define AGPIOC_PROTECT32 _IOW (AGPIOC_BASE, 5, compat_uptr_t)
38#define AGPIOC_ALLOCATE32 _IOWR(AGPIOC_BASE, 6, compat_uptr_t)
39#define AGPIOC_DEALLOCATE32 _IOW (AGPIOC_BASE, 7, compat_int_t)
40#define AGPIOC_BIND32 _IOW (AGPIOC_BASE, 8, compat_uptr_t)
41#define AGPIOC_UNBIND32 _IOW (AGPIOC_BASE, 9, compat_uptr_t)
42#define AGPIOC_CHIPSET_FLUSH32 _IO (AGPIOC_BASE, 10)
43
44struct agp_info32 {
45 struct agp_version version;
46 u32 bridge_id;
47 u32 agp_mode;
48 compat_long_t aper_base;
49 compat_size_t aper_size;
50 compat_size_t pg_total;
51 compat_size_t pg_system;
52 compat_size_t pg_used;
53};
54
55
56
57
58struct agp_segment32 {
59 compat_off_t pg_start;
60 compat_size_t pg_count;
61 compat_int_t prot;
62};
63
64struct agp_region32 {
65 compat_pid_t pid;
66 compat_size_t seg_count;
67 struct agp_segment32 *seg_list;
68};
69
70struct agp_allocate32 {
71 compat_int_t key;
72 compat_size_t pg_count;
73 u32 type;
74 u32 physical;
75
76
77
78};
79
80struct agp_bind32 {
81 compat_int_t key;
82 compat_off_t pg_start;
83};
84
85struct agp_unbind32 {
86 compat_int_t key;
87 u32 priority;
88};
89
90extern struct agp_front_data agp_fe;
91
92int agpioc_acquire_wrap(struct agp_file_private *priv);
93int agpioc_release_wrap(struct agp_file_private *priv);
94int agpioc_protect_wrap(struct agp_file_private *priv);
95int agpioc_setup_wrap(struct agp_file_private *priv, void __user *arg);
96int agpioc_deallocate_wrap(struct agp_file_private *priv, int arg);
97struct agp_file_private *agp_find_private(pid_t pid);
98struct agp_client *agp_create_client(pid_t id);
99int agp_remove_client(pid_t id);
100int agp_create_segment(struct agp_client *client, struct agp_region *region);
101void agp_free_memory_wrap(struct agp_memory *memory);
102struct agp_memory *agp_allocate_memory_wrap(size_t pg_count, u32 type);
103struct agp_memory *agp_find_mem_by_key(int key);
104struct agp_client *agp_find_client_by_pid(pid_t id);
105
106#endif
107