aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/generic.c')
-rw-r--r--drivers/char/agp/generic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index 1e8b461b91f1..a3bcc7ef42f9 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -1132,7 +1132,9 @@ int agp_generic_insert_memory(struct agp_memory * mem, off_t pg_start, int type)
1132 } 1132 }
1133 1133
1134 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { 1134 for (i = 0, j = pg_start; i < mem->page_count; i++, j++) {
1135 writel(bridge->driver->mask_memory(bridge, mem->pages[i], mask_type), 1135 writel(bridge->driver->mask_memory(bridge,
1136 phys_to_gart(page_to_phys(mem->pages[i])),
1137 mask_type),
1136 bridge->gatt_table+j); 1138 bridge->gatt_table+j);
1137 } 1139 }
1138 readl(bridge->gatt_table+j-1); /* PCI Posting. */ 1140 readl(bridge->gatt_table+j-1); /* PCI Posting. */
@@ -1347,9 +1349,8 @@ void global_cache_flush(void)
1347EXPORT_SYMBOL(global_cache_flush); 1349EXPORT_SYMBOL(global_cache_flush);
1348 1350
1349unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge, 1351unsigned long agp_generic_mask_memory(struct agp_bridge_data *bridge,
1350 struct page *page, int type) 1352 dma_addr_t addr, int type)
1351{ 1353{
1352 unsigned long addr = phys_to_gart(page_to_phys(page));
1353 /* memory type is ignored in the generic routine */ 1354 /* memory type is ignored in the generic routine */
1354 if (bridge->driver->masks) 1355 if (bridge->driver->masks)
1355 return addr | bridge->driver->masks[0].mask; 1356 return addr | bridge->driver->masks[0].mask;