agp/intel: Use the correct mask to detect i830 aperture size.
authorTim Gardner <tim.gardner@canonical.com>
Fri, 9 Jul 2010 20:48:50 +0000 (14:48 -0600)
committerEric Anholt <eric@anholt.net>
Mon, 26 Jul 2010 18:27:07 +0000 (11:27 -0700)
commite7b96f28c58ca09f15f6c2e8ccbb889a30fab4f7
treec18a4935e21c4d4f567489fed10899e2447a985c
parent9c928d168d4030a230a7a5ee1764721d173f1153
agp/intel: Use the correct mask to detect i830 aperture size.

BugLink: https://bugs.launchpad.net/bugs/597075
commit f1befe71fa7a79ab733011b045639d8d809924ad introduced a
regression when detecting aperture size of some i915 adapters, e.g.,
those on the Intel Q35 chipset.

The original report: https://bugzilla.kernel.org/show_bug.cgi?id=15733
The regression report: https://bugzilla.kernel.org/show_bug.cgi?id=16294

According to the specification found at
http://intellinuxgraphics.org/VOL_1_graphics_core.pdf, the PCI config
space register I830_GMCH_CTRL is a mirror of GMCH Graphics
Control. The correct macro for isolating the aperture size bits is
therefore I830_GMCH_GMS_MASK along with the attendant changes to the
case statement.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Tested-by: Kees Cook <kees.cook@canonical.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Eric Anholt <eric@anholt.net>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/char/agp/intel-gtt.c