Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166016
b: refs/heads/master
c: 07f73f6
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson authored and Jesse Barnes committed Sep 17, 2009
1 parent e86f36c commit 52b30ce
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 82 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: 3ef94daae7530b4ebcd2e5f48f1028cd2d2470ba
refs/heads/master: 07f73f6912667621276b002e33844ef283d98203
13 changes: 13 additions & 0 deletions trunk/drivers/gpu/drm/drm_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ drm_gem_object_alloc(struct drm_device *dev, size_t size)
if (IS_ERR(obj->filp))
goto free;

/* Basically we want to disable the OOM killer and handle ENOMEM
* ourselves by sacrificing pages from cached buffers.
* XXX shmem_file_[gs]et_gfp_mask()
*/
mapping_set_gfp_mask(obj->filp->f_path.dentry->d_inode->i_mapping,
GFP_HIGHUSER |
__GFP_COLD |
__GFP_FS |
__GFP_RECLAIMABLE |
__GFP_NORETRY |
__GFP_NOWARN |
__GFP_NOMEMALLOC);

kref_init(&obj->refcount);
kref_init(&obj->handlecount);
obj->size = size;
Expand Down
Loading

0 comments on commit 52b30ce

Please sign in to comment.