Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166033
b: refs/heads/master
c: 2d7ef39
h: refs/heads/master
i:
  166031: 440518a
v: v3
  • Loading branch information
Chris Wilson committed Sep 23, 2009
1 parent 211eae0 commit 5d3aacf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 963b483691314ed174ceb883f2b9f13b3ef7fb33
refs/heads/master: 2d7ef395b310e17c86fa6190f21ea1f2eccae5d1
5 changes: 5 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4110,6 +4110,11 @@ i915_gem_madvise_ioctl(struct drm_device *dev, void *data,
obj_priv->madv = args->madv;
args->retained = obj_priv->gtt_space != NULL;

/* if the object is no longer bound, discard its backing storage */
if (i915_gem_object_is_purgeable(obj_priv) &&
obj_priv->gtt_space == NULL)
i915_gem_object_truncate(obj);

drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);

Expand Down

0 comments on commit 5d3aacf

Please sign in to comment.