agp/intel: Restrict GTT mapping to valid range on i915 and i945
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 18 May 2010 11:24:51 +0000 (12:24 +0100)
committerEric Anholt <eric@anholt.net>
Wed, 26 May 2010 21:10:27 +0000 (14:10 -0700)
commitf1befe71fa7a79ab733011b045639d8d809924ad
tree0855977ab676ad0f7ee4feb215e41ad29d30e371
parent9a7e8492d17394a81d5534abf90b5b2ada7ea3c0
agp/intel: Restrict GTT mapping to valid range on i915 and i945

References:

  Bug 15733 - Crash when accessing nonexistent GTT entries in i915
  https://bugzilla.kernel.org/show_bug.cgi?id=15733

On G33 and above, the size of the GTT space is determined by the GMCH
control register. Prior to this revision, the size is determined by the
size of the aperture. So we must careful to map and fill the appropriate
range depending on chipset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/char/agp/intel-gtt.c