summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Widawsky <benjamin.widawsky@intel.com>2014-04-03 19:20:02 -0700
committerBen Widawsky <benjamin.widawsky@intel.com>2014-06-20 18:36:15 -0700
commit7772a5f084348cedd6557f3dc2d79f12e39c5823 (patch)
tree551ab1868401662b254982dc35ac719df34a567d
parent545c40445f36b66a89fd580f45c7ec2d0c3663ef (diff)
TESTME: Always force invalidate
-rw-r--r--drivers/gpu/drm/i915/i915_gem_context.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 1b8b7e4692e5..682c607b3215 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -675,6 +675,14 @@ static int do_switch(struct intel_engine_cs *ring,
if (!to->is_initialized || i915_gem_context_is_default(to))
hw_flags |= MI_RESTORE_INHIBIT;
+ /* When SW intends to use semaphore signaling between Command streamers,
+ * it must avoid lite restores in HW by programming "Force Restore" bit
+ * to ‘1’ in context descriptor during context submission
+ */
+ if (IS_GEN8(ring->dev) && to->is_initialized &&
+ !i915_gem_context_is_default(to))
+ hw_flags |= MI_FORCE_RESTORE;
+
ret = mi_set_context(ring, to, hw_flags);
if (ret)
goto unpin_out;