aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-06-14 19:43:09 -0400
committerKeith Packard <keithp@keithp.com>2011-06-21 14:11:02 -0400
commite92d03bff9a0d0bcbb812c9b1290ca96c9338d45 (patch)
tree3f5ff85abc0d78717cb11249f9b340d90f714ad3 /drivers
parentec6a890dfed7dd245beba5e5bcdfcffbd934c284 (diff)
Revert "drm/i915: Kill GTT mappings when moving from GTT domain"
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. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c10
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c4
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 94c84d744100..c6389de53161 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1219,11 +1219,11 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1219 ret = i915_gem_object_bind_to_gtt(obj, 0, true); 1219 ret = i915_gem_object_bind_to_gtt(obj, 0, true);
1220 if (ret) 1220 if (ret)
1221 goto unlock; 1221 goto unlock;
1222 }
1223 1222
1224 ret = i915_gem_object_set_to_gtt_domain(obj, write); 1223 ret = i915_gem_object_set_to_gtt_domain(obj, write);
1225 if (ret) 1224 if (ret)
1226 goto unlock; 1225 goto unlock;
1226 }
1227 1227
1228 if (obj->tiling_mode == I915_TILING_NONE) 1228 if (obj->tiling_mode == I915_TILING_NONE)
1229 ret = i915_gem_object_put_fence(obj); 1229 ret = i915_gem_object_put_fence(obj);
@@ -2926,8 +2926,6 @@ i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj)
2926 */ 2926 */
2927 wmb(); 2927 wmb();
2928 2928
2929 i915_gem_release_mmap(obj);
2930
2931 old_write_domain = obj->base.write_domain; 2929 old_write_domain = obj->base.write_domain;
2932 obj->base.write_domain = 0; 2930 obj->base.write_domain = 0;
2933 2931
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 20a4cc5b818f..4934cf84c320 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,
187 if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_CPU) 187 if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_CPU)
188 i915_gem_clflush_object(obj); 188 i915_gem_clflush_object(obj);
189 189
190 /* blow away mappings if mapped through GTT */
191 if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_GTT)
192 i915_gem_release_mmap(obj);
193
194 if (obj->base.pending_write_domain) 190 if (obj->base.pending_write_domain)
195 cd->flips |= atomic_read(&obj->pending_flip); 191 cd->flips |= atomic_read(&obj->pending_flip);
196 192