Skip to content

Commit

Permalink
drm/i915: i915_gem_object_finish_gtt must always release gtt mmap
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Keith Packard committed Jun 25, 2011
1 parent 2cd1176 commit b97c3d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2155,15 +2155,15 @@ static void i915_gem_object_finish_gtt(struct drm_i915_gem_object *obj)
{
u32 old_write_domain, old_read_domains;

if ((obj->base.read_domains & I915_GEM_DOMAIN_GTT) == 0)
return;

/* Act a barrier for all accesses through the GTT */
mb();

/* Force a pagefault for domain tracking on next user access */
i915_gem_release_mmap(obj);

if ((obj->base.read_domains & I915_GEM_DOMAIN_GTT) == 0)
return;

old_read_domains = obj->base.read_domains;
old_write_domain = obj->base.write_domain;

Expand Down

0 comments on commit b97c3d9

Please sign in to comment.