summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-gtt.c
diff options
context:
space:
mode:
authorChris Wilson2010-12-23 11:40:38 +0100
committerChris Wilson2011-01-11 21:35:41 +0100
commitc97689d8860f086125e7ff9cd730027a0057ca4f (patch)
tree019ab7330af6c975ffba0d7016e0ed6243fbf6b0 /drivers/char/agp/intel-gtt.c
parentdrm/i915: Workaround erratum on i830 for TAIL pointer within last 2 cachelines (diff)
downloadkernel-qcow2-linux-c97689d8860f086125e7ff9cd730027a0057ca4f.tar.gz
kernel-qcow2-linux-c97689d8860f086125e7ff9cd730027a0057ca4f.tar.xz
kernel-qcow2-linux-c97689d8860f086125e7ff9cd730027a0057ca4f.zip
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/char/agp/intel-gtt.c')
-rw-r--r--drivers/char/agp/intel-gtt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 356f73e0d17e..da8161806f39 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)
}
}
+ /* On the resume path we may be adjusting the PGTBL value, so
+ * be paranoid and flush all chipset write buffers...
+ */
+ if (INTEL_GTT_GEN >= 3)
+ writel(0, intel_private.registers+GFX_FLSH_CNTL);
+
reg = intel_private.registers+I810_PGETBL_CTL;
writel(intel_private.PGETBL_save, reg);
if (HAS_PGTBL_EN && (readl(reg) & I810_PGETBL_ENABLED) == 0) {
@@ -823,6 +829,9 @@ static bool intel_enable_gtt(void)
return false;
}
+ if (INTEL_GTT_GEN >= 3)
+ writel(0, intel_private.registers+GFX_FLSH_CNTL);
+
return true;
}