aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-agp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 15:43:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 15:43:49 -0400
commita45fbc33137b11e479ea8b7d478a1d7e6488971b (patch)
tree947b39b8d39acd5db2d3a966921ec76443b9b5eb /drivers/char/agp/intel-agp.c
parentc813b4e16ead3c3df98ac84419d4df2adf33fe01 (diff)
parenta64d2b37c2259e169759c1701ac565f0a11dc0ea (diff)
Merge branch 'agp-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6
* 'agp-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6: agp/nvidia: Support agp user-memory on nvidia agp. agp/amd-k7: Suspend support for AMD K7 GART driver agp/intel: Reduce extraneous PCI posting reads during init agp: Fix stolen memory counting on G4X.
Diffstat (limited to 'drivers/char/agp/intel-agp.c')
-rw-r--r--drivers/char/agp/intel-agp.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 043e36628d6d..1108665913e2 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -54,8 +54,7 @@
54 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ 54 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \
55 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ 55 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
56 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \ 56 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \
57 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \ 57 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB)
58 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)
59 58
60#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \ 59#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \
61 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \ 60 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
@@ -63,7 +62,8 @@
63 62
64#define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_E_HB || \ 63#define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_E_HB || \
65 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ 64 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \
66 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB) 65 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \
66 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)
67 67
68extern int agp_memory_reserved; 68extern int agp_memory_reserved;
69 69
@@ -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;
@@ -525,8 +525,10 @@ static void intel_i830_init_gtt_entries(void)
525 size += 4; 525 size += 4;
526 } else if (IS_G4X) { 526 } else if (IS_G4X) {
527 /* On 4 series hardware, GTT stolen is separate from graphics 527 /* On 4 series hardware, GTT stolen is separate from graphics
528 * stolen, ignore it in stolen gtt entries counting */ 528 * stolen, ignore it in stolen gtt entries counting. However,
529 size = 0; 529 * 4KB of the stolen memory doesn't get mapped to the GTT.
530 */
531 size = 4;
530 } else { 532 } else {
531 /* On previous hardware, the GTT size was just what was 533 /* On previous hardware, the GTT size was just what was
532 * required to map the aperture. 534 * required to map the aperture.
@@ -773,8 +775,8 @@ static int intel_i830_configure(void)
773 if (agp_bridge->driver->needs_scratch_page) { 775 if (agp_bridge->driver->needs_scratch_page) {
774 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++) {
775 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));
776 readl(intel_private.registers+I810_PTE_BASE+(i*4)); /* PCI Posting. */
777 } 778 }
779 readl(intel_private.registers+I810_PTE_BASE+((i-1)*4)); /* PCI Posting. */
778 } 780 }
779 781
780 global_cache_flush(); 782 global_cache_flush();
@@ -989,8 +991,8 @@ static int intel_i915_configure(void)
989 if (agp_bridge->driver->needs_scratch_page) { 991 if (agp_bridge->driver->needs_scratch_page) {
990 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++) {
991 writel(agp_bridge->scratch_page, intel_private.gtt+i); 993 writel(agp_bridge->scratch_page, intel_private.gtt+i);
992 readl(intel_private.gtt+i); /* PCI Posting. */
993 } 994 }
995 readl(intel_private.gtt+i-1); /* PCI Posting. */
994 } 996 }
995 997
996 global_cache_flush(); 998 global_cache_flush();