Merge branch 'agp-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 Nov 2009 01:08:16 +0000 (17:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 Nov 2009 01:08:16 +0000 (17:08 -0800)
* 'agp-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
  agp/intel-agp: Set dma_mask for capable chipsets before agp_add_bridge()

drivers/char/agp/intel-agp.c

index 4068467ce7b93bcd8e82e1174603b089b868c6b9..10e1f0390bbba6bd4dc5f8141adc26dcb2e8b460 100644 (file)
@@ -1161,12 +1161,6 @@ static int intel_i915_configure(void)
 
        intel_i9xx_setup_flush();
 
-#ifdef USE_PCI_DMA_API 
-       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");
-#endif
-
        return 0;
 }
 
@@ -2456,6 +2450,11 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
                                &bridge->mode);
        }
 
+       if (bridge->driver->mask_memory == intel_i965_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");
+
        pci_set_drvdata(pdev, bridge);
        return agp_add_bridge(bridge);
 }