0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef _AGP_COMPAT_IOCTL_H
0027 #define _AGP_COMPAT_IOCTL_H
0028
0029 #include <linux/compat.h>
0030 #include <linux/agpgart.h>
0031
0032 #define AGPIOC_INFO32 _IOR (AGPIOC_BASE, 0, compat_uptr_t)
0033 #define AGPIOC_ACQUIRE32 _IO (AGPIOC_BASE, 1)
0034 #define AGPIOC_RELEASE32 _IO (AGPIOC_BASE, 2)
0035 #define AGPIOC_SETUP32 _IOW (AGPIOC_BASE, 3, compat_uptr_t)
0036 #define AGPIOC_RESERVE32 _IOW (AGPIOC_BASE, 4, compat_uptr_t)
0037 #define AGPIOC_PROTECT32 _IOW (AGPIOC_BASE, 5, compat_uptr_t)
0038 #define AGPIOC_ALLOCATE32 _IOWR(AGPIOC_BASE, 6, compat_uptr_t)
0039 #define AGPIOC_DEALLOCATE32 _IOW (AGPIOC_BASE, 7, compat_int_t)
0040 #define AGPIOC_BIND32 _IOW (AGPIOC_BASE, 8, compat_uptr_t)
0041 #define AGPIOC_UNBIND32 _IOW (AGPIOC_BASE, 9, compat_uptr_t)
0042 #define AGPIOC_CHIPSET_FLUSH32 _IO (AGPIOC_BASE, 10)
0043
0044 struct agp_info32 {
0045 struct agp_version version;
0046 u32 bridge_id;
0047 u32 agp_mode;
0048 compat_long_t aper_base;
0049 compat_size_t aper_size;
0050 compat_size_t pg_total;
0051 compat_size_t pg_system;
0052 compat_size_t pg_used;
0053 };
0054
0055
0056
0057
0058 struct agp_segment32 {
0059 compat_off_t pg_start;
0060 compat_size_t pg_count;
0061 compat_int_t prot;
0062 };
0063
0064 struct agp_region32 {
0065 compat_pid_t pid;
0066 compat_size_t seg_count;
0067 struct agp_segment32 *seg_list;
0068 };
0069
0070 struct agp_allocate32 {
0071 compat_int_t key;
0072 compat_size_t pg_count;
0073 u32 type;
0074 u32 physical;
0075
0076
0077
0078 };
0079
0080 struct agp_bind32 {
0081 compat_int_t key;
0082 compat_off_t pg_start;
0083 };
0084
0085 struct agp_unbind32 {
0086 compat_int_t key;
0087 u32 priority;
0088 };
0089
0090 extern struct agp_front_data agp_fe;
0091
0092 int agpioc_acquire_wrap(struct agp_file_private *priv);
0093 int agpioc_release_wrap(struct agp_file_private *priv);
0094 int agpioc_protect_wrap(struct agp_file_private *priv);
0095 int agpioc_setup_wrap(struct agp_file_private *priv, void __user *arg);
0096 int agpioc_deallocate_wrap(struct agp_file_private *priv, int arg);
0097 struct agp_file_private *agp_find_private(pid_t pid);
0098 struct agp_client *agp_create_client(pid_t id);
0099 int agp_remove_client(pid_t id);
0100 int agp_create_segment(struct agp_client *client, struct agp_region *region);
0101 void agp_free_memory_wrap(struct agp_memory *memory);
0102 struct agp_memory *agp_allocate_memory_wrap(size_t pg_count, u32 type);
0103 struct agp_memory *agp_find_mem_by_key(int key);
0104 struct agp_client *agp_find_client_by_pid(pid_t id);
0105
0106 #endif