In order for the objects to be coherent in uncached memory (as they are
presumed to be on the unbound list) we need to clflush them because
experience dictates that the CPU caches will be dirtied across
hibernation.

Cc: [email protected]
Signed-off-by: Chris Wilson <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c 
b/drivers/gpu/drm/i915/i915_gem_gtt.c
index bdaca3f..368c821 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -404,6 +404,9 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
                i915_gem_gtt_bind_object(obj, obj->cache_level);
        }
 
+       list_for_each_entry(obj, &dev_priv->mm.unbound_list, gtt_list)
+               i915_gem_clflush_object(obj);
+
        i915_gem_chipset_flush(dev);
 }
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to