]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
intel-agp: Set dma mask for i915
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 5 Aug 2009 07:12:40 +0000 (08:12 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 5 Aug 2009 07:13:27 +0000 (08:13 +0100)
If DMAR is configured in but absent, we really do want to make sure that
the dma mask is set appropriately. Otherwise we get mapping failures on
highmem. Spotted by Zhenyu Wang.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/char/agp/intel-agp.c

index aa8889e8afc8ee95e81421fa71e53450ac532a09..9bc3a0b82b962909a2b453ee76a42a3bcd9f8795 100644 (file)
@@ -1140,6 +1140,12 @@ 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;
 }