All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michele Ballabio <barra_cuda@katamail.com>
To: Ben Skeggs <bskeggs@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] nouveau: avoid excessive gart aperture for on-board cards
Date: Sun, 19 Aug 2012 21:50:40 +0200	[thread overview]
Message-ID: <1345405840-2740-1-git-send-email-barra_cuda@katamail.com> (raw)

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 <barra_cuda@katamail.com>
---

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;
-- 
1.7.11.1


                 reply	other threads:[~2012-08-19 19:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345405840-2740-1-git-send-email-barra_cuda@katamail.com \
    --to=barra_cuda@katamail.com \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.