From patchwork Thu Jul 1 20:19:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 57594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id E4F191007FE for ; Fri, 2 Jul 2010 06:19:36 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OUQEL-0004b2-7z; Thu, 01 Jul 2010 21:19:29 +0100 Received: from smtp.outflux.net ([198.145.64.163]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OUQEJ-0004ax-HB for kernel-team@lists.ubuntu.com; Thu, 01 Jul 2010 21:19:27 +0100 Received: from www.outflux.net (serenity-end.outflux.net [10.2.0.2]) by vinyl.outflux.net (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id o61KJQRe031648 for ; Thu, 1 Jul 2010 13:19:26 -0700 Date: Thu, 1 Jul 2010 13:19:25 -0700 From: Kees Cook To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: SAUCE: i915: ubreak G33 GTT size calculation Message-ID: <20100701201925.GJ4837@outflux.net> MIME-Version: 1.0 Content-Disposition: inline Organization: Ubuntu X-MIMEDefang-Filter: outflux$Revision: 1.316 $ X-HELO: www.outflux.net X-Scanned-By: MIMEDefang 2.67 on 10.2.0.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com 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. Signed-off-by: Kees Cook --- drivers/char/agp/intel-gtt.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 9344216..472d9f7 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -1229,6 +1229,13 @@ static int intel_i915_get_gtt_size(void) (gmch_ctrl & G33_PGETBL_SIZE_MASK)); size = 512; } + /* revert the G33 logic changes due to + https://bugzilla.kernel.org/show_bug.cgi?id=16294 + without re-breaking the non-G33 case which motivated + the change from + https://bugzilla.kernel.org/show_bug.cgi?id=15733 + */ + size = 1024; } else { /* On previous hardware, the GTT size was just what was * required to map the aperture.