aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-06-25 00:02:59 -0400
committerKeith Packard <keithp@keithp.com>2011-06-25 00:02:59 -0400
commitb97c3d9c1655522be3adc5ae1aa153a18467e924 (patch)
treee177fb47db75b19071cbfd24aaec018b8282e49c
parent2cd1176bd9e92924242e779dcc5c8fc922f96659 (diff)
drm/i915: i915_gem_object_finish_gtt must always release gtt mmap
Even if the object is no longer in the GTT domain, there may still be a user space mapping which needs to be released. Without this fix, render-based text (mostly in firefox) would occasionally get corrupted when the system was under load. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b29e0f2b780a..6026817372da 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2155,15 +2155,15 @@ static void i915_gem_object_finish_gtt(struct drm_i915_gem_object *obj)
2155{ 2155{
2156 u32 old_write_domain, old_read_domains; 2156 u32 old_write_domain, old_read_domains;
2157 2157
2158 if ((obj->base.read_domains & I915_GEM_DOMAIN_GTT) == 0)
2159 return;
2160
2161 /* Act a barrier for all accesses through the GTT */ 2158 /* Act a barrier for all accesses through the GTT */
2162 mb(); 2159 mb();
2163 2160
2164 /* Force a pagefault for domain tracking on next user access */ 2161 /* Force a pagefault for domain tracking on next user access */
2165 i915_gem_release_mmap(obj); 2162 i915_gem_release_mmap(obj);
2166 2163
2164 if ((obj->base.read_domains & I915_GEM_DOMAIN_GTT) == 0)
2165 return;
2166
2167 old_read_domains = obj->base.read_domains; 2167 old_read_domains = obj->base.read_domains;
2168 old_write_domain = obj->base.write_domain; 2168 old_write_domain = obj->base.write_domain;
2169 2169