Skip to content

Commit f00f979

Browse files
airlieddanvet
authored andcommitted
i915: don't map imported dma-bufs for dmar.
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. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent e47e9ad commit f00f979

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/i915/i915_gem_gtt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ int i915_gem_gtt_prepare_object(struct drm_i915_gem_object *obj)
361361
struct drm_device *dev = obj->base.dev;
362362
struct drm_i915_private *dev_priv = dev->dev_private;
363363

364-
if (dev_priv->mm.gtt->needs_dmar)
364+
/* don't map imported dma buf objects */
365+
if (dev_priv->mm.gtt->needs_dmar && !obj->sg_table)
365366
return intel_gtt_map_memory(obj->pages,
366367
obj->base.size >> PAGE_SHIFT,
367368
&obj->sg_list,

0 commit comments

Comments
 (0)