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: sta...@vger.kernel.org
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to