aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-10-14 20:18:45 -0400
committerDave Airlie <airlied@redhat.com>2008-10-16 00:10:11 -0400
commit44d494417278e49f5b42bd3ded1801b6d2254db8 (patch)
treecb4cc026102f45995b417aa7656763bbdeaebc49 /drivers/char/agp
parent82e14a6215cbc9804ecc35281e973c6c8ce22fe7 (diff)
agp/intel: Reduce extraneous PCI posting reads during init
Instead of doing a posting read after each GTT entry update, do a single one at the end of the writes. This should reduce boot time a tiny amount by avoiding a lot of extra uncached reads. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/agp')
-rw-r--r--drivers/char/agp/intel-agp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index f1fe74901314..81f094244471 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -214,8 +214,8 @@ static int intel_i810_configure(void)
214 if (agp_bridge->driver->needs_scratch_page) { 214 if (agp_bridge->driver->needs_scratch_page) {
215 for (i = 0; i < current_size->num_entries; i++) { 215 for (i = 0; i < current_size->num_entries; i++) {
216 writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4)); 216 writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4));
217 readl(intel_private.registers+I810_PTE_BASE+(i*4)); /* PCI posting. */
218 } 217 }
218 readl(intel_private.registers+I810_PTE_BASE+((i-1)*4)); /* PCI posting. */
219 } 219 }
220 global_cache_flush(); 220 global_cache_flush();
221 return 0; 221 return 0;
@@ -775,8 +775,8 @@ static int intel_i830_configure(void)
775 if (agp_bridge->driver->needs_scratch_page) { 775 if (agp_bridge->driver->needs_scratch_page) {
776 for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) { 776 for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {
777 writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4)); 777 writel(agp_bridge->scratch_page, intel_private.registers+I810_PTE_BASE+(i*4));
778 readl(intel_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */
779 } 778 }
779 readl(intel_private.registers+I810_PTE_BASE+((i-1)*4)); /* PCI Posting. */
780 } 780 }
781 781
782 global_cache_flush(); 782 global_cache_flush();
@@ -991,8 +991,8 @@ static int intel_i915_configure(void)
991 if (agp_bridge->driver->needs_scratch_page) { 991 if (agp_bridge->driver->needs_scratch_page) {
992 for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) { 992 for (i = intel_private.gtt_entries; i < current_size->num_entries; i++) {
993 writel(agp_bridge->scratch_page, intel_private.gtt+i); 993 writel(agp_bridge->scratch_page, intel_private.gtt+i);
994 readl(intel_private.gtt+i); /* PCI Posting. */
995 } 994 }
995 readl(intel_private.gtt+i-1); /* PCI Posting. */
996 } 996 }
997 997
998 global_cache_flush(); 998 global_cache_flush();