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_H
0027 #define _AGP_H 1
0028
0029 #include <linux/mutex.h>
0030 #include <linux/agp_backend.h>
0031 #include <uapi/linux/agpgart.h>
0032
0033 struct agp_info {
0034 struct agp_version version;
0035 u32 bridge_id;
0036 u32 agp_mode;
0037 unsigned long aper_base;
0038 size_t aper_size;
0039 size_t pg_total;
0040 size_t pg_system;
0041 size_t pg_used;
0042 };
0043
0044 struct agp_setup {
0045 u32 agp_mode;
0046 };
0047
0048
0049
0050
0051 struct agp_segment {
0052 off_t pg_start;
0053 size_t pg_count;
0054 int prot;
0055 };
0056
0057 struct agp_segment_priv {
0058 off_t pg_start;
0059 size_t pg_count;
0060 pgprot_t prot;
0061 };
0062
0063 struct agp_region {
0064 pid_t pid;
0065 size_t seg_count;
0066 struct agp_segment *seg_list;
0067 };
0068
0069 struct agp_allocate {
0070 int key;
0071 size_t pg_count;
0072 u32 type;
0073 u32 physical;
0074
0075
0076
0077 };
0078
0079 struct agp_bind {
0080 int key;
0081 off_t pg_start;
0082 };
0083
0084 struct agp_unbind {
0085 int key;
0086 u32 priority;
0087 };
0088
0089 struct agp_client {
0090 struct agp_client *next;
0091 struct agp_client *prev;
0092 pid_t pid;
0093 int num_segments;
0094 struct agp_segment_priv **segments;
0095 };
0096
0097 struct agp_controller {
0098 struct agp_controller *next;
0099 struct agp_controller *prev;
0100 pid_t pid;
0101 int num_clients;
0102 struct agp_memory *pool;
0103 struct agp_client *clients;
0104 };
0105
0106 #define AGP_FF_ALLOW_CLIENT 0
0107 #define AGP_FF_ALLOW_CONTROLLER 1
0108 #define AGP_FF_IS_CLIENT 2
0109 #define AGP_FF_IS_CONTROLLER 3
0110 #define AGP_FF_IS_VALID 4
0111
0112 struct agp_file_private {
0113 struct agp_file_private *next;
0114 struct agp_file_private *prev;
0115 pid_t my_pid;
0116 unsigned long access_flags;
0117 };
0118
0119 struct agp_front_data {
0120 struct mutex agp_mutex;
0121 struct agp_controller *current_controller;
0122 struct agp_controller *controllers;
0123 struct agp_file_private *file_priv_list;
0124 bool used_by_controller;
0125 bool backend_acquired;
0126 };
0127
0128 #endif