aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2012-03-28 16:39:33 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-03-28 18:02:25 -0400
commit4b60d29ee00cb2114075e8b5c2c23928bbd76c28 (patch)
tree67d587028223587f89ab78f5f098a033d4cf482c /drivers/char
parent90b107c8f7ea75ef55db4e0515dda86b245f8978 (diff)
agp/intel: map more registers for use by the GTT code
We need to flush the Gunit TLB when we update GTT PTEs on VLV, but the register for doing so is above the range we normally map. Map the whole register space to make sure we can get it. v2: only map the larger space on gen7+ (Daniel) Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/intel-gtt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 5cf47ac2d401..269cb0287b10 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1206,12 +1206,16 @@ static inline int needs_idle_maps(void)
1206static int i9xx_setup(void) 1206static int i9xx_setup(void)
1207{ 1207{
1208 u32 reg_addr; 1208 u32 reg_addr;
1209 int size = KB(512);
1209 1210
1210 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &reg_addr); 1211 pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &reg_addr);
1211 1212
1212 reg_addr &= 0xfff80000; 1213 reg_addr &= 0xfff80000;
1213 1214
1214 intel_private.registers = ioremap(reg_addr, 128 * 4096); 1215 if (INTEL_GTT_GEN >= 7)
1216 size = MB(2);
1217
1218 intel_private.registers = ioremap(reg_addr, size);
1215 if (!intel_private.registers) 1219 if (!intel_private.registers)
1216 return -ENOMEM; 1220 return -ENOMEM;
1217 1221