public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Eric Anholt <eric@anholt.net>
Cc: David Airlie <airlied@linux.ie>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] agp/intel: Fix dma mask for Sandybridge
Date: Fri, 20 Aug 2010 17:36:08 +0200	[thread overview]
Message-ID: <s5hlj81cn4n.wl%tiwai@suse.de> (raw)

Sandybridge requires 36bit dma mask, but the current code checks only
against i965, thus it gives Oops with i915 probing on 32bit machine:

   nommu_map_sg: overflow 14a000000+4096 of device mask ffffffff
   [drm:drm_agp_bind_pages] *ERROR* Failed to bind AGP memory: -12
   BUG: unable to handle kernel paging request at fffffff8
   IP: [<f7fac57f>] i915_gem_evict_something+0xef/0x230 [i915]
   ...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 drivers/char/agp/intel-agp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index ddf5def..c563a60 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -845,7 +845,8 @@ static int __devinit intel_gmch_probe(struct pci_dev *pdev,
 
 	dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name);
 
-	if (bridge->driver->mask_memory == intel_i965_mask_memory) {
+	if (bridge->driver->mask_memory == intel_i965_mask_memory ||
+	    bridge->driver->mask_memory == intel_gen6_mask_memory) {
 		if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36)))
 			dev_err(&intel_private.pcidev->dev,
 				"set gfx device dma mask 36bit failed!\n");
-- 
1.7.2.1


             reply	other threads:[~2010-08-20 15:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 15:36 Takashi Iwai [this message]
2010-08-23  1:35 ` [PATCH] agp/intel: Fix dma mask for Sandybridge Zhenyu Wang
2010-08-23  5:29   ` Takashi Iwai
2010-08-23  5:43     ` Zhenyu Wang
2010-08-23  6:02       ` Takashi Iwai
2010-08-23  6:13         ` Takashi Iwai
2010-08-23  6:19         ` Zhenyu Wang
2010-08-23  6:31           ` Takashi Iwai
2010-08-23  6:48             ` Zhenyu Wang
2010-08-23 14:02               ` Eric Anholt

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=s5hlj81cn4n.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhenyuw@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox