[Intel-gfx] [PATCH 3/3] drm/i915: Memory node free handling on truncation of stolen obj

sourab.gupta at intel.com sourab.gupta at intel.com
Fri Mar 7 10:59:27 CET 2014


From: Sourab Gupta <sourab.gupta at intel.com>

While we are freeing the purgeable stolen object, the memory node has
to be freed so as to make space for the new object.

Signed-off-by: Sourab Gupta <sourab.gupta at intel.com>
---
 drivers/gpu/drm/i915/i915_gem_stolen.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
index d092bf3..ae12074 100644
--- a/drivers/gpu/drm/i915/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
@@ -411,10 +411,8 @@ found:
 
 			ret = i915_gem_object_put_pages(obj);
 			if (ret == 0) {
+				i915_gem_object_release_stolen(obj);
 				obj->madv = __I915_MADV_PURGED;
-
-				kfree(obj->stolen);
-				obj->stolen = NULL;
 			} else
 				i915_gem_object_pin_pages(obj);
 		}
-- 
1.7.9.5




More information about the Intel-gfx mailing list