All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i915: don't map imported dma-bufs for dmar.
@ 2012-07-31  5:58 Dave Airlie
  2012-08-05 20:54 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Airlie @ 2012-07-31  5:58 UTC (permalink / raw)
  To: dri-devel

From: Dave Airlie <airlied@redhat.com>

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>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 9fd25a4..ee9b68f 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -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,
-- 
1.7.11.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i915: don't map imported dma-bufs for dmar.
  2012-07-31  5:58 [PATCH] i915: don't map imported dma-bufs for dmar Dave Airlie
@ 2012-08-05 20:54 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2012-08-05 20:54 UTC (permalink / raw)
  To: Dave Airlie; +Cc: dri-devel

On Tue, Jul 31, 2012 at 03:58:13PM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
> 
> 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>
Picked up for -fixes, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-05 20:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31  5:58 [PATCH] i915: don't map imported dma-bufs for dmar Dave Airlie
2012-08-05 20:54 ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.