Blob Blame Raw
From: Linus Torvalds <>
Date: Fri, 2 Jul 2010 00:04:42 +0000 (+1000)
Subject: drm/i915: fix hibernation since i915 self-reclaim fixes
X-Git-Tag: v2.6.35-rc4~13

drm/i915: fix hibernation since i915 self-reclaim fixes

Since commit 4bdadb9785696439c6e2b3efe34aa76df1149c83 ("drm/i915:
Selectively enable self-reclaim"), we've been passing GFP_MOVABLE to the
i915 page allocator where we weren't before due to some over-eager
removal of the page mapping gfp_flags games the code used to play.

This caused hibernate on Intel hardware to result in a lot of memory
corruptions on resume.  See for example

Reported-by: Evengi Golov (in bugzilla)
Signed-off-by: Dave Airlie <>
Tested-by: M. Vefa Bicakci <>
Cc: Chris Wilson <>
Cc: KOSAKI Motohiro <>
Cc: Hugh Dickins <>
Signed-off-by: Linus Torvalds <>

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9ded3da..0743858 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2239,7 +2239,7 @@ i915_gem_object_get_pages(struct drm_gem_object *obj,
 	mapping = inode->i_mapping;
 	for (i = 0; i < page_count; i++) {
 		page = read_cache_page_gfp(mapping, i,
-					   mapping_gfp_mask (mapping) |
+					   GFP_HIGHUSER |
 					   __GFP_COLD |
 		if (IS_ERR(page))