aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp')
-rw-r--r--drivers/char/agp/agp.h4
-rw-r--r--drivers/char/agp/generic.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index 81e14bea54bd..395168fb17e3 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -30,6 +30,10 @@
30#define _AGP_BACKEND_PRIV_H 1 30#define _AGP_BACKEND_PRIV_H 1
31 31
32#include <asm/agp.h> /* for flush_agp_cache() */ 32#include <asm/agp.h> /* for flush_agp_cache() */
33#ifndef map_page_into_agp_noflush
34#define map_page_into_agp_noflush(page) map_page_into_agp(page)
35#define map_page_into_agp_global_flush()
36#endif
33 37
34#define PFX "agpgart: " 38#define PFX "agpgart: "
35 39
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index eaa1a355bb32..bf239b8ecac5 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -274,6 +274,7 @@ struct agp_memory *agp_allocate_memory(struct agp_bridge_data *bridge,
274 new->memory[i] = virt_to_gart(addr); 274 new->memory[i] = virt_to_gart(addr);
275 new->page_count++; 275 new->page_count++;
276 } 276 }
277 map_page_into_agp_global_flush();
277 new->bridge = bridge; 278 new->bridge = bridge;
278 279
279 return new; 280 return new;
@@ -1186,7 +1187,8 @@ void *agp_generic_alloc_page(struct agp_bridge_data *bridge)
1186 if (page == NULL) 1187 if (page == NULL)
1187 return NULL; 1188 return NULL;
1188 1189
1189 map_page_into_agp(page); 1190 /* agp_allocate_memory will do flush */
1191 map_page_into_agp_noflush(page);
1190 1192
1191 get_page(page); 1193 get_page(page);
1192 atomic_inc(&agp_bridge->current_memory_agp); 1194 atomic_inc(&agp_bridge->current_memory_agp);