@@ -1212,23 +1212,7 @@ static int intel_i915_get_gtt_size(void)
int size;
if (IS_G33) {
- u16 gmch_ctrl;
-
- /* G33's GTT size defined in gmch_ctrl */
- pci_read_config_word(agp_bridge->dev, I830_GMCH_CTRL, &gmch_ctrl);
- switch (gmch_ctrl & G33_PGETBL_SIZE_MASK) {
- case G33_PGETBL_SIZE_1M:
- size = 1024;
- break;
- case G33_PGETBL_SIZE_2M:
- size = 2048;
- break;
- default:
- dev_info(&agp_bridge->dev->dev,
- "unknown page table size 0x%x, assuming 512KB\n",
- (gmch_ctrl & G33_PGETBL_SIZE_MASK));
- size = 512;
- }
+ size = 1024;
} else {
/* On previous hardware, the GTT size was just what was
* required to map the aperture.
Upstream fixed https://bugzilla.kernel.org/show_bug.cgi?id=15733 by correctly calculating the GTT size using aperture size on non-G33 hardware. In the process, the G33 case was also changed, which lead to the regression documented in https://bugzilla.kernel.org/show_bug.cgi?id=16294 This patch reverts the G33 logic without re-breaking the non-G33 logic. BugLink: https://bugs.launchpad.net/bugs/597075 Signed-off-by: Kees Cook <kees.cook at canonical.com> --- v2: - drop the entire auto-detect code for G33 since it is not correct --- drivers/char/agp/intel-gtt.c | 18 +----------------- 1 files changed, 1 insertions(+), 17 deletions(-)