From patchwork Tue Mar 1 22:24:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Niehusmann X-Patchwork-Id: 601281 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 p21MOaSr002722 for ; Tue, 1 Mar 2011 22:25:01 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4463D9EEC6 for ; Tue, 1 Mar 2011 14:24:36 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.moria.gondor.com (vs1.gondor.com [78.47.100.202]) by gabe.freedesktop.org (Postfix) with ESMTP id 55FBC9E752 for ; Tue, 1 Mar 2011 14:24:19 -0800 (PST) Received: from vpn.moria.gondor.com ([10.12.0.8] helo=localhost) by mail.moria.gondor.com with esmtp (Exim 4.72) (envelope-from ) id 1PuXzM-0000eB-Rc; Tue, 01 Mar 2011 23:24:16 +0100 Date: Tue, 1 Mar 2011 23:24:16 +0100 From: Jan Niehusmann To: Chris Wilson , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Message-ID: <20110301222416.GA3526@x61s.reliablesolutions.de> References: <20110223233022.GA3439@x61s.reliablesolutions.de> <20110225123056.GA3759@x61s.reliablesolutions.de> <20110225211646.GA6837@x61s.reliablesolutions.de> <20110225230527.GC3601@viiv.ffwll.ch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110225230527.GC3601@viiv.ffwll.ch> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: [Intel-gfx] [PATCH] drm/i915: 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: , 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]); Tue, 01 Mar 2011 22:25:02 +0000 (UTC) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 17bd766..1961580 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1895,6 +1895,12 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) if (IS_GEN2(dev)) dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(30)); + /* 965GM sometimes incorrectly writes to hardware status page (HWS) + * using 32bit addressing, overwriting memory if HWS is located + * above 4GB. */ + if (IS_BROADWATER(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); if (!dev_priv->regs) {