[PATCH] agp/intel: Fix dma mask for Sandybridge

Takashi Iwai tiwai at suse.de
Fri Aug 20 08:36:08 PDT 2010


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 at 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



More information about the dri-devel mailing list