From patchwork Fri Feb 25 20:22:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 591151 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1PKNGuf018698 for ; Fri, 25 Feb 2011 20:23:38 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 628C09EFDE for ; Fri, 25 Feb 2011 12:23:15 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 427E89E732 for ; Fri, 25 Feb 2011 12:22:57 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 25 Feb 2011 12:22:57 -0800 Message-Id: X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.62,227,1297065600"; d="scan'208";a="606622267" Received: from unknown (HELO cwilso3-mobl.ger.corp.intel.com) ([10.255.12.110]) by orsmga002.jf.intel.com with SMTP; 25 Feb 2011 12:22:54 -0800 Received: by cwilso3-mobl.ger.corp.intel.com (sSMTP sendmail emulation); Fri, 25 Feb 2011 20:22:53 +0000 Date: Fri, 25 Feb 2011 20:22:53 +0000 To: Jan Niehusmann , linux-kernel@vger.kernel.org References: <20110223233022.GA3439@x61s.reliablesolutions.de> <20110225123056.GA3759@x61s.reliablesolutions.de> From: Chris Wilson In-Reply-To: <20110225123056.GA3759@x61s.reliablesolutions.de> Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH] intel-gtt: fix memory corruption with GM965 and >4GB RAM X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 25 Feb 2011 20:23:38 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index ffa2196..268e448 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1896,6 +1896,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long /* overlay on gen2 is broken and can't address above 1G */ if (IS_GEN2(dev)) dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(30)); + if (IS_BRROADWATER(dev) || IS_CRESTLINE(dev)) + dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(32)); mmio_bar = IS_GEN2(dev) ? 1 : 0; dev_priv->regs = pci_iomap(dev->pdev, mmio_bar, 0); to prevent hitting the erratum. However your bug looks to be: diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index ffa2196..3b80507 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -66,9 +66,9 @@ static int i915_init_phys_hws(struct drm_device *dev) memset_io(ring->status_page.page_addr, 0, PAGE_SIZE); - if (INTEL_INFO(dev)->gen >= 4) - dev_priv->dma_status_page |= (dev_priv->dma_status_page >> 28) & - 0xf0; + if (INTEL_INFO(dev)->gen >= 4) /* 36-bit addressing */ + dev_priv->dma_status_page |= + (dev_priv->status_page_dmah->busaddr >> 28) & 0xf0; I915_WRITE(HWS_PGA, dev_priv->dma_status_page); DRM_DEBUG_DRIVER("Enabled hardware status page\n");