All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "drm/i915: Kill GTT mappings when moving from GTT domain"
@ 2011-06-14 23:43 Eric Anholt
  2011-06-15  9:39 ` Chris Wilson
  0 siblings, 1 reply; 17+ messages in thread
From: Eric Anholt @ 2011-06-14 23:43 UTC (permalink / raw)
  To: intel-gfx

This reverts commit 4a684a4117abd756291969336af454e8a958802f.
Userland has always been required to set the object's domain to GTT
before using it through a GTT mapping, it's not something that the
kernel is supposed to enforce.  (The pagefault support is so that we
can handle multiple mappings without userland having to pin across
them, not so that userland can use GTT after GPU domains without
telling the kernel).

Fixes 19.2% +/- 0.8% (n=6) performance regression in cairo-gl
firefox-talos-gfx on my T420 latop.
---
 drivers/gpu/drm/i915/i915_gem.c            |   10 ++++------
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |    4 ----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index d231729..7bbd355 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1218,11 +1218,11 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 		ret = i915_gem_object_bind_to_gtt(obj, 0, true);
 		if (ret)
 			goto unlock;
-	}
 
-	ret = i915_gem_object_set_to_gtt_domain(obj, write);
-	if (ret)
-		goto unlock;
+		ret = i915_gem_object_set_to_gtt_domain(obj, write);
+		if (ret)
+			goto unlock;
+	}
 
 	if (obj->tiling_mode == I915_TILING_NONE)
 		ret = i915_gem_object_put_fence(obj);
@@ -2953,8 +2953,6 @@ i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj)
 	 */
 	wmb();
 
-	i915_gem_release_mmap(obj);
-
 	old_write_domain = obj->base.write_domain;
 	obj->base.write_domain = 0;
 
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 20a4cc5..4934cf8 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -187,10 +187,6 @@ i915_gem_object_set_to_gpu_domain(struct drm_i915_gem_object *obj,
 	if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_CPU)
 		i915_gem_clflush_object(obj);
 
-	/* blow away mappings if mapped through GTT */
-	if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_GTT)
-		i915_gem_release_mmap(obj);
-
 	if (obj->base.pending_write_domain)
 		cd->flips |= atomic_read(&obj->pending_flip);
 
-- 
1.7.5.3

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

end of thread, other threads:[~2011-06-21 18:09 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 23:43 [PATCH] Revert "drm/i915: Kill GTT mappings when moving from GTT domain" Eric Anholt
2011-06-15  9:39 ` Chris Wilson
2011-06-15 15:08   ` Eric Anholt
2011-06-15 16:03     ` Chris Wilson
2011-06-17 19:06       ` Eric Anholt
2011-06-18 11:43         ` Chris Wilson
2011-06-18 20:20           ` Eric Anholt
2011-06-19 16:28             ` Chris Wilson
2011-06-19 17:01               ` Eric Anholt
2011-06-19 17:14                 ` Chris Wilson
2011-06-19 21:20                   ` Eric Anholt
2011-06-19 21:49                     ` Chris Wilson
2011-06-21 16:17                       ` Remove the overhead of vm_insert_pfn() Chris Wilson
2011-06-21 16:17                         ` [PATCH 1/3] resource: Use a common string for .name = "System RAM" Chris Wilson
2011-06-21 16:17                         ` [PATCH 2/3] x86, pat: Perform interval rbtree lookup of memtype first Chris Wilson
2011-06-21 16:17                         ` [PATCH 3/3] x86, pat: Convert memtype_lock spinlock to a rwlock Chris Wilson
2011-06-21 18:09                       ` [PATCH] Revert "drm/i915: Kill GTT mappings when moving from GTT domain" Keith Packard

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.