summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.h
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2012-06-04 14:42:50 -0700
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-06-14 17:36:19 +0200
commit12b0286f49947a6cdc9285032d918466a8c3f5f9 (patch)
tree7fa02ef380f2260b2c5eae769b6ac8c40e7d92b2 /drivers/gpu/drm/i915/intel_ringbuffer.h
parentcc0f6398225ffd2b890ff83eafe212b1ae863cad (diff)
downloadblackbird-op-linux-12b0286f49947a6cdc9285032d918466a8c3f5f9.tar.gz
blackbird-op-linux-12b0286f49947a6cdc9285032d918466a8c3f5f9.zip
drm/i915: possibly invalidate TLB before context switch
From http://intellinuxgraphics.org/documentation/SNB/IHD_OS_Vol1_Part3.pdf [DevSNB] If Flush TLB invalidation Mode is enabled it's the driver's responsibility to invalidate the TLBs at least once after the previous context switch after any GTT mappings changed (including new GTT entries). This can be done by a pipelined PIPE_CONTROL with TLB inv bit set immediately before MI_SET_CONTEXT. On GEN7 the invalidation mode is explicitly set, but this appears to be lacking for GEN6. Since I don't know the history on this, I've decided to dynamically read the value at ring init time, and use that value throughout. v2: better comment (daniel) Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.h')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index b7884b90474a..594c9c4ad396 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -116,6 +116,10 @@ struct intel_ring_buffer {
wait_queue_head_t irq_queue;
+ /**
+ * Do an explicit TLB flush before MI_SET_CONTEXT
+ */
+ bool itlb_before_ctx_switch;
struct i915_hw_context *default_context;
struct drm_i915_gem_object *last_context_obj;
OpenPOWER on IntegriCloud