aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/agp.h
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2009-07-23 12:25:49 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-08-03 04:04:47 -0400
commitff663cf8705bea101d5f73cf471855c85242575e (patch)
tree4b338298e69d2401cab848b4b9082bef07e5d9aa /drivers/char/agp/agp.h
parent2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7 (diff)
agp: Add generic support for graphics dma remapping
New driver hooks for support graphics memory dma remapping are introduced in this patch. It makes generic code can tell if current device needs dma remapping, then call driver provided interfaces for mapping and unmapping. Change has also been made to handle scratch_page in remapping case. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/char/agp/agp.h')
-rw-r--r--drivers/char/agp/agp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index ce110a3bf298..17e6d0d3ba36 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -121,6 +121,11 @@ struct agp_bridge_driver {
121 void (*agp_destroy_pages)(struct agp_memory *); 121 void (*agp_destroy_pages)(struct agp_memory *);
122 int (*agp_type_to_mask_type) (struct agp_bridge_data *, int); 122 int (*agp_type_to_mask_type) (struct agp_bridge_data *, int);
123 void (*chipset_flush)(struct agp_bridge_data *); 123 void (*chipset_flush)(struct agp_bridge_data *);
124
125 int (*agp_map_page)(void *addr, dma_addr_t *ret);
126 void (*agp_unmap_page)(void *addr, dma_addr_t dma);
127 int (*agp_map_memory)(struct agp_memory *mem);
128 void (*agp_unmap_memory)(struct agp_memory *mem);
124}; 129};
125 130
126struct agp_bridge_data { 131struct agp_bridge_data {
@@ -135,6 +140,7 @@ struct agp_bridge_data {
135 u32 *gatt_table_real; 140 u32 *gatt_table_real;
136 unsigned long scratch_page; 141 unsigned long scratch_page;
137 unsigned long scratch_page_real; 142 unsigned long scratch_page_real;
143 dma_addr_t scratch_page_dma;
138 unsigned long gart_bus_addr; 144 unsigned long gart_bus_addr;
139 unsigned long gatt_bus_addr; 145 unsigned long gatt_bus_addr;
140 u32 mode; 146 u32 mode;