aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2012-12-13 10:47:47 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-13 15:40:24 -0500
commit20652097dadd9a7fb4d652f25466299974bc78f9 (patch)
treebad3f5f7d5ea54739d090798597f037737c8c98c /drivers/gpu/drm
parent335c07b7982eff480afdf8c9b25225511dd07031 (diff)
drm/i915: Fix missed needs_dmar setting
From Ben's AGP dependence removal change, "needs_dmar" flag has not been properly setup for new chips using new GTT init function. This one adds missed setting of that flag to make sure we do pci mappings with IOMMU enabled. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index f7ac61ee1504..2c150dee78a7 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -639,6 +639,10 @@ int i915_gem_gtt_init(struct drm_device *dev)
639 if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(40))) 639 if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(40)))
640 pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(40)); 640 pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(40));
641 641
642#ifdef CONFIG_INTEL_IOMMU
643 dev_priv->mm.gtt->needs_dmar = 1;
644#endif
645
642 /* For GEN6+ the PTEs for the ggtt live at 2MB + BAR0 */ 646 /* For GEN6+ the PTEs for the ggtt live at 2MB + BAR0 */
643 gtt_bus_addr = pci_resource_start(dev->pdev, 0) + (2<<20); 647 gtt_bus_addr = pci_resource_start(dev->pdev, 0) + (2<<20);
644 dev_priv->mm.gtt->gma_bus_addr = pci_resource_start(dev->pdev, 2); 648 dev_priv->mm.gtt->gma_bus_addr = pci_resource_start(dev->pdev, 2);