Skip to contentSkip to conversation

i915: don't map imported dma-bufs for dmar.

PATCH Applied Dave Airlie 2 participants 2 messages Jul 31, 2012 – Aug 5, 2012

Subsystems (2)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 i915: don't map imported dma-bufs for dmar.

From: Dave Airlie <[email protected]>

The exporter should have given us pages in the correct place, avoid the prepare object mapping phase on dmar systems.

This fixes an oops on a GM45/R600 machine, when running the intel/radeon tests.

---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -1
index 9fd25a4..ee9b68f 100644
@@ -361,7 +361,8 @@ int i915_gem_gtt_prepare_object(struct drm_i915_gem_object *obj)
 	struct drm_device *dev = obj->base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
-	if (dev_priv->mm.gtt->needs_dmar)
+	/* don't map imported dma buf objects */
+	if (dev_priv->mm.gtt->needs_dmar && !obj->sg_table)
 		return intel_gtt_map_memory(obj->pages,
 					    obj->base.size >> PAGE_SHIFT,
 					    &obj->sg_list,
Signature · 1 line
1.7.11.2
#1 lore raw
Quoted 9 lines · Dave Airlie

From: Dave Airlie <[email protected]>

The exporter should have given us pages in the correct place, avoid the prepare object mapping phase on dmar systems.

This fixes an oops on a GM45/R600 machine, when running the intel/radeon tests.

Picked up for -fixes, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48