vserver 2.0 rc7
[linux-2.6.git] / include / linux / agp_backend.h
index 3678646..a5c8bb5 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * AGPGART backend specific includes. Not for userspace consumption.
  *
+ * Copyright (C) 2004 Silicon Graphics, Inc.
  * Copyright (C) 2002-2003 Dave Jones
  * Copyright (C) 1999 Jeff Hartmann
  * Copyright (C) 1999 Precision Insight, Inc.
@@ -63,21 +64,24 @@ struct agp_kern_info {
        struct vm_operations_struct *vm_ops;
 };
 
-/* 
+/*
  * The agp_memory structure has information about the block of agp memory
  * allocated.  A caller may manipulate the next and prev pointers to link
  * each allocated item into a list.  These pointers are ignored by the backend.
  * Everything else should never be written to, but the caller may read any of
- * the items to detrimine the status of this block of agp memory. 
+ * the items to determine the status of this block of agp memory.
  */
 
+struct agp_bridge_data;
+
 struct agp_memory {
-       int key;
        struct agp_memory *next;
        struct agp_memory *prev;
+       struct agp_bridge_data *bridge;
+       unsigned long *memory;
        size_t page_count;
+       int key;
        int num_scratch_pages;
-       unsigned long *memory;
        off_t pg_start;
        u32 type;
        u32 physical;
@@ -87,14 +91,19 @@ struct agp_memory {
 
 #define AGP_NORMAL_MEMORY 0
 
+extern struct agp_bridge_data *agp_bridge;
+extern struct list_head agp_bridges;
+
+extern struct agp_bridge_data *(*agp_find_bridge)(struct pci_dev *);
+
 extern void agp_free_memory(struct agp_memory *);
-extern struct agp_memory *agp_allocate_memory(size_t, u32);
-extern int agp_copy_info(struct agp_kern_info *);
+extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, u32);
+extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *);
 extern int agp_bind_memory(struct agp_memory *, off_t);
 extern int agp_unbind_memory(struct agp_memory *);
-extern void agp_enable(u32);
-extern int agp_backend_acquire(void);
-extern void agp_backend_release(void);
+extern void agp_enable(struct agp_bridge_data *, u32);
+extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *);
+extern void agp_backend_release(struct agp_bridge_data *);
 
 #endif                         /* __KERNEL__ */
 #endif                         /* _AGP_BACKEND_H */