[PATCH 1/2] drm/i915: Restore GTT domain tracking of unbound objects upon resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: stable at vger.kernel.org
Signed-off-by: Chris Wilson <chris at 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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux