Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165983
b: refs/heads/master
c: 5323fd0
h: refs/heads/master
i:
  165981: 4822d20
  165979: 0c87e71
  165975: 302b2dd
  165967: 3ccbaed
  165951: f681805
v: v3
  • Loading branch information
Eric Anholt committed Sep 9, 2009
1 parent c711dd7 commit 0c575d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7839c5d5519b6d9e2ccf3cdbf1c39e3817ad0835
refs/heads/master: 5323fd042f89164927ee8c311f0a975e8c846412
16 changes: 8 additions & 8 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1915,6 +1915,12 @@ i915_gem_object_unbind(struct drm_gem_object *obj)
return -EINVAL;
}

/* blow away mappings if mapped through GTT */
i915_gem_release_mmap(obj);

if (obj_priv->fence_reg != I915_FENCE_REG_NONE)
i915_gem_clear_fence_reg(obj);

/* Move the object to the CPU domain to ensure that
* any possible CPU writes while it's not in the GTT
* are flushed when we go to remap it. This will
Expand All @@ -1928,20 +1934,14 @@ i915_gem_object_unbind(struct drm_gem_object *obj)
return ret;
}

BUG_ON(obj_priv->active);

if (obj_priv->agp_mem != NULL) {
drm_unbind_agp(obj_priv->agp_mem);
drm_free_agp(obj_priv->agp_mem, obj->size / PAGE_SIZE);
obj_priv->agp_mem = NULL;
}

BUG_ON(obj_priv->active);

/* blow away mappings if mapped through GTT */
i915_gem_release_mmap(obj);

if (obj_priv->fence_reg != I915_FENCE_REG_NONE)
i915_gem_clear_fence_reg(obj);

i915_gem_object_put_pages(obj);

if (obj_priv->gtt_space) {
Expand Down

0 comments on commit 0c575d8

Please sign in to comment.