From patchwork Sun Aug 19 19:50:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michele Ballabio X-Patchwork-Id: 1345131 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id C09633FC33 for ; Sun, 19 Aug 2012 20:47:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BCA9BA1059 for ; Sun, 19 Aug 2012 13:47:00 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 422 seconds by postgrey-1.32 at gabe; Sun, 19 Aug 2012 21:56:42 CEST Received: from smtpg-pc.aruba.it (smtpg-pc.aruba.it [62.149.157.233]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D16BA1010 for ; Sun, 19 Aug 2012 12:56:42 -0700 (PDT) Received: from localhost ([78.134.117.74]) by smtpcm1-pc.aruba.it with bizsmtp id ojpc1j0011cPQTy01jpcqx; Sun, 19 Aug 2012 21:49:38 +0200 From: Michele Ballabio To: Ben Skeggs Subject: [PATCH] nouveau: avoid excessive gart aperture for on-board cards Date: Sun, 19 Aug 2012 21:50:40 +0200 Message-Id: <1345405840-2740-1-git-send-email-barra_cuda@katamail.com> X-Mailer: git-send-email 1.7.11.1 X-Mailman-Approved-At: Sun, 19 Aug 2012 13:23:35 -0700 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Commit d0f3c7e41d30859a638083654002b9b6faf7f67b ("drm/nouveau: give a slightly larger pci(e)gart aperture on all chipsets") removed a test: that caused an 8x increase in gart aperture, instead of a 2x one, for on-board cards >= NV_40. Signed-off-by: Michele Ballabio --- Hi, in Linux 3.5.x I experienced some crashes of the X server, and noticed from the boot that while the gart aperture in 3.4.x was 64MB, in 3.5.x became 512MB. So I came out with this quick patch: this seems to work, since X did not crash anymore (and I tried quite hard to), but I'm not sure if it is the right fix. drivers/gpu/drm/nouveau/nouveau_sgdma.c | 2 +- 1 file modificato, 1 inserzione(+). 1 rimozione(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index 38483a0..ebc27f7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c @@ -341,7 +341,7 @@ nouveau_sgdma_init(struct drm_device *dev) u32 aper_size, align; int ret; - if (dev_priv->card_type >= NV_40) + if (dev_priv->card_type >= NV_40 && pci_is_pcie(dev->pdev)) aper_size = 512 * 1024 * 1024; else aper_size = 128 * 1024 * 1024;