aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-23 05:40:38 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-11 15:35:41 -0500
commitc97689d8860f086125e7ff9cd730027a0057ca4f (patch)
tree019ab7330af6c975ffba0d7016e0ed6243fbf6b0 /drivers
parent55249baaa5cd188ebd9acdb047eeaed8092e4a93 (diff)
agp/intel: Flush the chipset write buffers when changing GTT base
Flush the chipset write buffers before and after adjusting the GTT base register, just in case. We only modify this value upon initialisation (boot and resume) so there should be no outstanding writes, however there are always those persistent PGTBL_ER that keep getting reported upon resume. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/intel-agp.h2
-rw-r--r--drivers/char/agp/intel-gtt.c9
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/char/agp/intel-agp.h b/drivers/char/agp/intel-agp.h
index 010e3defd6c..c195bfeade1 100644
--- a/drivers/char/agp/intel-agp.h
+++ b/drivers/char/agp/intel-agp.h
@@ -94,6 +94,8 @@
94#define G4x_GMCH_SIZE_VT_1_5M (0xa << 8) 94#define G4x_GMCH_SIZE_VT_1_5M (0xa << 8)
95#define G4x_GMCH_SIZE_VT_2M (0xc << 8) 95#define G4x_GMCH_SIZE_VT_2M (0xc << 8)
96 96
97#define GFX_FLSH_CNTL 0x2170 /* 915+ */
98
97#define I810_DRAM_CTL 0x3000 99#define I810_DRAM_CTL 0x3000
98#define I810_DRAM_ROW_0 0x00000001 100#define I810_DRAM_ROW_0 0x00000001
99#define I810_DRAM_ROW_0_SDRAM 0x00000001 101#define I810_DRAM_ROW_0_SDRAM 0x00000001
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 356f73e0d17..da8161806f3 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -814,6 +814,12 @@ static bool intel_enable_gtt(void)
814 } 814 }
815 } 815 }
816 816
817 /* On the resume path we may be adjusting the PGTBL value, so
818 * be paranoid and flush all chipset write buffers...
819 */
820 if (INTEL_GTT_GEN >= 3)
821 writel(0, intel_private.registers+GFX_FLSH_CNTL);
822
817 reg = intel_private.registers+I810_PGETBL_CTL; 823 reg = intel_private.registers+I810_PGETBL_CTL;
818 writel(intel_private.PGETBL_save, reg); 824 writel(intel_private.PGETBL_save, reg);
819 if (HAS_PGTBL_EN && (readl(reg) & I810_PGETBL_ENABLED) == 0) { 825 if (HAS_PGTBL_EN && (readl(reg) & I810_PGETBL_ENABLED) == 0) {
@@ -823,6 +829,9 @@ static bool intel_enable_gtt(void)
823 return false; 829 return false;
824 } 830 }
825 831
832 if (INTEL_GTT_GEN >= 3)
833 writel(0, intel_private.registers+GFX_FLSH_CNTL);
834
826 return true; 835 return true;
827} 836}
828 837