aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/agp/backend.c6
-rw-r--r--drivers/char/agp/generic.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index 4d5ed18dad00..27bca34b4a65 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -147,7 +147,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
147 printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); 147 printk(KERN_ERR PFX "unable to get memory for scratch page.\n");
148 return -ENOMEM; 148 return -ENOMEM;
149 } 149 }
150 global_flush_tlb(); 150 flush_agp_mappings();
151 151
152 bridge->scratch_page_real = virt_to_gart(addr); 152 bridge->scratch_page_real = virt_to_gart(addr);
153 bridge->scratch_page = 153 bridge->scratch_page =
@@ -191,7 +191,7 @@ err_out:
191 if (bridge->driver->needs_scratch_page) { 191 if (bridge->driver->needs_scratch_page) {
192 bridge->driver->agp_destroy_page( 192 bridge->driver->agp_destroy_page(
193 gart_to_virt(bridge->scratch_page_real)); 193 gart_to_virt(bridge->scratch_page_real));
194 global_flush_tlb(); 194 flush_agp_mappings();
195 } 195 }
196 if (got_gatt) 196 if (got_gatt)
197 bridge->driver->free_gatt_table(bridge); 197 bridge->driver->free_gatt_table(bridge);
@@ -217,7 +217,7 @@ static void agp_backend_cleanup(struct agp_bridge_data *bridge)
217 bridge->driver->needs_scratch_page) { 217 bridge->driver->needs_scratch_page) {
218 bridge->driver->agp_destroy_page( 218 bridge->driver->agp_destroy_page(
219 gart_to_virt(bridge->scratch_page_real)); 219 gart_to_virt(bridge->scratch_page_real));
220 global_flush_tlb(); 220 flush_agp_mappings();
221 } 221 }
222} 222}
223 223
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index 19f242b50781..5567ce8d72b0 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -155,7 +155,7 @@ void agp_free_memory(struct agp_memory *curr)
155 for (i = 0; i < curr->page_count; i++) { 155 for (i = 0; i < curr->page_count; i++) {
156 curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i])); 156 curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]));
157 } 157 }
158 global_flush_tlb(); 158 flush_agp_mappings();
159 } 159 }
160 agp_free_key(curr->key); 160 agp_free_key(curr->key);
161 vfree(curr->memory); 161 vfree(curr->memory);
@@ -213,8 +213,6 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
213 new->memory[i] = virt_to_gart(addr); 213 new->memory[i] = virt_to_gart(addr);
214 new->page_count++; 214 new->page_count++;
215 } 215 }
216 global_flush_tlb();
217
218 new->bridge = bridge; 216 new->bridge = bridge;
219 217
220 flush_agp_mappings(); 218 flush_agp_mappings();