Skip to content

Commit

Permalink
agp/intel: map more registers for use by the GTT code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesse Barnes authored and Daniel Vetter committed Mar 28, 2012
1 parent 90b107c commit 4b60d29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/char/agp/intel-gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,12 +1206,16 @@ static inline int needs_idle_maps(void)
static int i9xx_setup(void)
{
u32 reg_addr;
int size = KB(512);

pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &reg_addr);

reg_addr &= 0xfff80000;

intel_private.registers = ioremap(reg_addr, 128 * 4096);
if (INTEL_GTT_GEN >= 7)
size = MB(2);

intel_private.registers = ioremap(reg_addr, size);
if (!intel_private.registers)
return -ENOMEM;

Expand Down

0 comments on commit 4b60d29

Please sign in to comment.