Skip to contentSkip to conversation

drm/i915/chv: Implement Wa4x4STCOptimizationDisable:chv

PATCH In review Rodrigo Vivi 3 participants 3 messages Sep 17, 2014 – Sep 18, 2014

Subsystems (2)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/1 drm/i915/chv: Implement Wa4x4STCOptimizationDisable:chv

Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_ringbuffer.c +4 -0
index 4e8b2ea..50d9169 100644
@@ -784,6 +784,10 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)
 	intel_ring_emit_wa(ring, GEN8_ROW_CHICKEN,
 			   _MASKED_BIT_ENABLE(STALL_DOP_GATING_DISABLE));
 
+	/* Wa4x4STCOptimizationDisable:chv */
+	intel_ring_emit_wa(ring, CACHE_MODE_1,
+			   _MASKED_BIT_ENABLE(GEN8_4x4_STC_OPTIMIZATION_DISABLE));
+
 	/* WaDisableDopClockGating:chv (pre-production hw) */
 	intel_ring_emit_wa(ring, GEN7_ROW_CHICKEN2,
 			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 11 lines · Rodrigo Vivi
Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
index 4e8b2ea..50d9169 100644

drivers/gpu/drm/i915/intel_ringbuffer.c static int chv_init_workarounds(struct intel_engine_cs *ring) · line 790

Quoted 7 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4 -0
@@ -784,6 +784,10 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)
 	intel_ring_emit_wa(ring, GEN8_ROW_CHICKEN,
 			   _MASKED_BIT_ENABLE(STALL_DOP_GATING_DISABLE));
 
+	/* Wa4x4STCOptimizationDisable:chv */
+	intel_ring_emit_wa(ring, CACHE_MODE_1,
+			   _MASKED_BIT_ENABLE(GEN8_4x4_STC_OPTIMIZATION_DISABLE));
+

Let's try to keep these in some order shall we. So please put this as the last w/a.

Also you need to reserve more ring space, and because the ring tail must be QW aligned you need to toss in a MI_NOOP when the number of wa emits is odd. Maybe we should try to avoid future churn here and do something like:

int num_wa = 5;

intel_ring_begin(ALIGN(num_wa * 3, 2));

intel_ring_emit_wa(...);
...

if ((num_wa * 3) & 1)

	ring_emit(MI_NOOP);

intel_ring_advance();

Quoted 5 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
 	/* WaDisableDopClockGating:chv (pre-production hw) */
 	intel_ring_emit_wa(ring, GEN7_ROW_CHICKEN2,
 			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
Signature · 1 line
1.9.3
Signature · 2 lines
Ville Syrjälä
Intel OTC
#2 lore raw
Quoted 32 lines · Ville Syrjälä
Quoted 11 lines · Rodrigo Vivi
Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
index 4e8b2ea..50d9169 100644

drivers/gpu/drm/i915/intel_ringbuffer.c static int chv_init_workarounds(struct intel_engine_cs *ring) · line 790

Quoted 7 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4 -0
@@ -784,6 +784,10 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)
 	intel_ring_emit_wa(ring, GEN8_ROW_CHICKEN,
 			   _MASKED_BIT_ENABLE(STALL_DOP_GATING_DISABLE));
 
+	/* Wa4x4STCOptimizationDisable:chv */
+	intel_ring_emit_wa(ring, CACHE_MODE_1,
+			   _MASKED_BIT_ENABLE(GEN8_4x4_STC_OPTIMIZATION_DISABLE));
+

Let's try to keep these in some order shall we. So please put this as the last w/a.

Also you need to reserve more ring space, and because the ring tail must be QW aligned you need to toss in a MI_NOOP when the number of wa emits is odd. Maybe we should try to avoid future churn here and do something like:

int num_wa = 5;

intel_ring_begin(ALIGN(num_wa * 3, 2));

Quoted 7 lines

intel_ring_emit_wa(...);
...

if ((num_wa * 3) & 1)

	ring_emit(MI_NOOP);

intel_ring_advance();

Or since we batch up the tail writes, we can do the final padding then, so long as we always check for qword space in intel_ring_begin.

Patch on ml.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre