Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329352
b: refs/heads/master
c: 4d6294b
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Aug 24, 2012
1 parent 47a6211 commit 32665c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: 86a1ee26bb60e1ab8984e92f0e9186c354670aed
refs/heads/master: 4d6294bf77834276d41b51154a18663b0a8f2063
7 changes: 5 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,11 @@ i915_gem_object_truncate(struct drm_i915_gem_object *obj)
{
struct inode *inode;

i915_gem_object_free_mmap_offset(obj);

if (obj->base.filp == NULL)
return;

/* Our goal here is to return as much of the memory as
* is possible back to the system as we are called from OOM.
* To do this we must instruct the shmfs to drop all of its
Expand All @@ -1393,8 +1398,6 @@ i915_gem_object_truncate(struct drm_i915_gem_object *obj)
inode = obj->base.filp->f_path.dentry->d_inode;
shmem_truncate_range(inode, 0, (loff_t)-1);

i915_gem_object_free_mmap_offset(obj);

obj->madv = __I915_MADV_PURGED;
}

Expand Down

0 comments on commit 32665c6

Please sign in to comment.