summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Widawsky <benjamin.widawsky@intel.com>2014-01-29 11:55:28 -0800
committerBen Widawsky <benjamin.widawsky@intel.com>2014-05-07 10:07:09 -0700
commit5f1b04a1410f3733d1b313a352c21c05c2a01c99 (patch)
tree52cf5f360f1585f9d8fb4890ce5a6808441bcc38
parentf529bca4b3863ca94079f86d6398a94de6311e85 (diff)
DONT_MERGE drm/i915: FORCE_RESTORE for gen8 semaphoresbdw-sema
This appears to not actually be needed on the current code. Just putting it on the ML so we can point bug reports at it later. As pointed out by Ville, the current code is "broken" since we do FORCE_RESTORE, and RESTORE_INHIBIT on the same dword. Anecdotally, this seems fine. Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
-rw-r--r--drivers/gpu/drm/i915/i915_gem_context.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index f77b4c126465..aa82fb4753ba 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -661,6 +661,13 @@ static int do_switch(struct intel_ring_buffer *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) && i915_semaphore_is_enabled(ring->dev))
+ hw_flags |= MI_FORCE_RESTORE;
+
ret = mi_set_context(ring, to, hw_flags);
if (ret)
goto unpin_out;