[PATCH] drm/i915: Restore global mappings upon resume

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

 



commit c6916417c8575637659686ff0e4f744babf0cb4e
Author: Ben Widawsky <ben@xxxxxxxxxxxx>
Date:   Tue Sep 24 09:58:00 2013 -0700

    drm/i915: Use the new vm [un]bind functions

changes the interpretation of the bind routines, and in particular we
only bind into the global GTT if we pass a flag to the routine. So upon
resume, we need to ask for whatever we thing is bound into the global
GTT (cursors, fences, scanouts) to be rebound or else glorious
corruption ensues.

Fixes: i-g-t/gem_suspend
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69834
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Ben Widawsky <ben@xxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index e053f14..022cc75 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -509,7 +509,7 @@ void i915_gem_restore_gtt_mappings(struct drm_device *dev)
 		struct i915_vma *vma = i915_gem_obj_to_vma(obj,
 							   &dev_priv->gtt.base);
 		i915_gem_clflush_object(obj, obj->pin_display);
-		vma->vm->bind_vma(vma, obj->cache_level, 0);
+		vma->vm->bind_vma(vma, obj->cache_level, obj->has_global_gtt_mapping ? GLOBAL_BIND : 0);
 	}
 
 	i915_gem_chipset_flush(dev);
-- 
1.8.4.rc3

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




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