[Intel-gfx] [PATCH 2/4] drm/i915: Drain any freed objects prior to hibernation

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 7 10:25:50 UTC 2017


As we call into the shrinker during freeze, we may have freed more
object since we idled during i915_gem_suspend. Make sure we flush the
i915_gem_free_objects worker prior to saving the unwanted pages into the
hibernation image.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 13cad69df20e..a28ca268a51c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4918,6 +4918,7 @@ int i915_gem_freeze_late(struct drm_i915_private *dev_priv)
 	 */
 
 	i915_gem_shrink(dev_priv, -1UL, I915_SHRINK_UNBOUND);
+	i915_gem_drain_freed_objects(dev_priv);
 
 	mutex_lock(&dev_priv->drm.struct_mutex);
 	for (p = phases; *p; p++) {
-- 
2.11.0



More information about the Intel-gfx mailing list