[PATCH v2] drm/i915/vlv: Enabling the TLB invalidate bit in GFX Mode register

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

 



From: Akash Goel <akash.goel@xxxxxxxxx>

This patch Enables the bit for TLB invalidate in GFX Mode register.

According to bspec,  When enabled this bit limits the invalidation
of the TLB only to batch buffer boundaries, to pipe_control
commands which have the TLB invalidation bit set and sync flushes.
If disabled, the TLB caches are flushed for every full flush of
the pipeline.

v2: Explicitly enabling TLB invalidate bit instead of assuming
default 1 (Chris Wilson)

Signed-off-by: Akash Goel <akash.goel@xxxxxxxxx>
Signed-off-by: Sourab Gupta <sourab.gupta@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 4eb3e06..dca8c6d 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -583,10 +583,17 @@ static int init_render_ring(struct intel_ring_buffer *ring)
 		I915_WRITE(GFX_MODE,
 			   _MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_ALWAYS));
 
-	if (IS_GEN7(dev))
-		I915_WRITE(GFX_MODE_GEN7,
-			   _MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) |
-			   _MASKED_BIT_ENABLE(GFX_REPLAY_MODE));
+	if (IS_GEN7(dev)) {
+		if (IS_VALLEYVIEW(dev)) {
+			/* FIXME, should also apply to ivb */
+			I915_WRITE(GFX_MODE_GEN7,
+					_MASKED_BIT_ENABLE(GFX_TLB_INVALIDATE_ALWAYS) |
+					_MASKED_BIT_ENABLE(GFX_REPLAY_MODE));
+		} else
+			I915_WRITE(GFX_MODE_GEN7,
+					_MASKED_BIT_DISABLE(GFX_TLB_INVALIDATE_ALWAYS) |
+					_MASKED_BIT_ENABLE(GFX_REPLAY_MODE));
+	}
 
 	if (INTEL_INFO(dev)->gen >= 5) {
 		ret = init_pipe_control(ring);
-- 
1.8.5.1

_______________________________________________
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