Skip to contentSkip to conversation

drm/i915/bdw: Implement Wa4x4STCOptimizationDisable:bdw

PATCH Applied Damien Lespiau 4 participants 6 messages Mar 26, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Not implementing this W/A can lead to hangs.

Cc Ben Widawsky <[email protected]>
Cc Rafael Barbalho <[email protected]>
Cc Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/i915_reg.h | 3 ++-
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +2 -1
index 0ebc20d..927a7c1 100644
@@ -1060,7 +1060,8 @@ enum punit_power_well {
 #define CACHE_MODE_0_GEN7	0x7000 /* IVB+ */
 #define   HIZ_RAW_STALL_OPT_DISABLE (1<<2)
 #define CACHE_MODE_1		0x7004 /* IVB+ */
-#define   PIXEL_SUBSPAN_COLLECT_OPT_DISABLE (1<<6)
+#define   PIXEL_SUBSPAN_COLLECT_OPT_DISABLE	(1<<6)
+#define   GEN8_4x4_STC_OPTIMIZATION_DISABLE	(1<<6)
 
 #define GEN6_BLITTER_ECOSKPD	0x221d0
 #define   GEN6_BLITTER_LOCK_SHIFT			16
drivers/gpu/drm/i915/intel_pm.c +4 -0
index c1e2d75..b66a43b 100644
@@ -4882,6 +4882,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	/* WaDisableSDEUnitClockGating:bdw */
 	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
 		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
+
+	/* Wa4x4STCOptimizationDisable:bdw */
+	I915_WRITE(CACHE_MODE_1,
+		   _MASKED_BIT_ENABLE(GEN8_4x4_STC_OPTIMIZATION_DISABLE));
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 6 lines
1.8.3.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Damien Lespiau

Not implementing this W/A can lead to hangs.

Cc Ben Widawsky <[email protected]>
Cc Rafael Barbalho <[email protected]>
Cc Ville Syrjälä <[email protected]>

From reading the HSD, it's not a workaround. It was a spec bug. I presume the workaround name came from the workaround database? If it did not, I'd just drop any mention of "workaround." If it's in the workaround database, maybe just leave it so we can check later.

Either way:

Quoted 37 lines
---
 drivers/gpu/drm/i915/i915_reg.h | 3 ++-
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +2 -1
index 0ebc20d..927a7c1 100644
@@ -1060,7 +1060,8 @@ enum punit_power_well {
 #define CACHE_MODE_0_GEN7	0x7000 /* IVB+ */
 #define   HIZ_RAW_STALL_OPT_DISABLE (1<<2)
 #define CACHE_MODE_1		0x7004 /* IVB+ */
-#define   PIXEL_SUBSPAN_COLLECT_OPT_DISABLE (1<<6)
+#define   PIXEL_SUBSPAN_COLLECT_OPT_DISABLE	(1<<6)
+#define   GEN8_4x4_STC_OPTIMIZATION_DISABLE	(1<<6)
 
 #define GEN6_BLITTER_ECOSKPD	0x221d0
 #define   GEN6_BLITTER_LOCK_SHIFT			16
drivers/gpu/drm/i915/intel_pm.c +4 -0
index c1e2d75..b66a43b 100644
@@ -4882,6 +4882,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	/* WaDisableSDEUnitClockGating:bdw */
 	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
 		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
+
+	/* Wa4x4STCOptimizationDisable:bdw */
+	I915_WRITE(CACHE_MODE_1,
+		   _MASKED_BIT_ENABLE(GEN8_4x4_STC_OPTIMIZATION_DISABLE));
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 1 line
1.8.3.1
Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 8 lines · Ben Widawsky
Quoted 6 lines · Damien Lespiau

Not implementing this W/A can lead to hangs.

Cc Ben Widawsky <[email protected]>
Cc Rafael Barbalho <[email protected]>
Cc Ville Syrjälä <[email protected]>
Quoted 7 lines

From reading the HSD, it's not a workaround. It was a spec bug. I presume the workaround name came from the workaround database? If it did not, I'd just drop any mention of "workaround." If it's in the workaround database, maybe just leave it so we can check later.

Either way:

Oh, and I think CC: stable

Quoted 45 lines
Quoted 38 lines
---
 drivers/gpu/drm/i915/i915_reg.h | 3 ++-
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +2 -1
index 0ebc20d..927a7c1 100644
@@ -1060,7 +1060,8 @@ enum punit_power_well {
 #define CACHE_MODE_0_GEN7	0x7000 /* IVB+ */
 #define   HIZ_RAW_STALL_OPT_DISABLE (1<<2)
 #define CACHE_MODE_1		0x7004 /* IVB+ */
-#define   PIXEL_SUBSPAN_COLLECT_OPT_DISABLE (1<<6)
+#define   PIXEL_SUBSPAN_COLLECT_OPT_DISABLE	(1<<6)
+#define   GEN8_4x4_STC_OPTIMIZATION_DISABLE	(1<<6)
 
 #define GEN6_BLITTER_ECOSKPD	0x221d0
 #define   GEN6_BLITTER_LOCK_SHIFT			16
drivers/gpu/drm/i915/intel_pm.c +4 -0
index c1e2d75..b66a43b 100644
@@ -4882,6 +4882,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	/* WaDisableSDEUnitClockGating:bdw */
 	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
 		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
+
+	/* Wa4x4STCOptimizationDisable:bdw */
+	I915_WRITE(CACHE_MODE_1,
+		   _MASKED_BIT_ENABLE(GEN8_4x4_STC_OPTIMIZATION_DISABLE));
 }
 
 static void haswell_init_clock_gating(struct drm_device *dev)
Signature · 1 line
1.8.3.1
Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 14 lines · Ben Widawsky
Quoted 13 lines · Ben Widawsky
Quoted 6 lines · Damien Lespiau

Not implementing this W/A can lead to hangs.

Cc Ben Widawsky <[email protected]>
Cc Rafael Barbalho <[email protected]>
Cc Ville Syrjälä <[email protected]>

From reading the HSD, it's not a workaround. It was a spec bug. I presume the workaround name came from the workaround database? If it did not, I'd just drop any mention of "workaround." If it's in the workaround database, maybe just leave it so we can check later.

Quoted 4 lines
Quoted 2 lines

Either way:

Oh, and I think CC: stable

Queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#4 lore raw
Quoted 15 lines · Daniel Vetter
Quoted 14 lines · Ben Widawsky
Quoted 13 lines · Ben Widawsky
Quoted 6 lines · Damien Lespiau

Not implementing this W/A can lead to hangs.

Cc Ben Widawsky <[email protected]>
Cc Rafael Barbalho <[email protected]>
Cc Ville Syrjälä <[email protected]>

From reading the HSD, it's not a workaround. It was a spec bug. I presume the workaround name came from the workaround database? If it did not, I'd just drop any mention of "workaround." If it's in the workaround database, maybe just leave it so we can check later.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Either way:

Oh, and I think CC: stable

Queued for -next, thanks for the patch.
-Daniel

You want/need this in bdw-backports?

Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
Quoted 19 lines · Ben Widawsky
Quoted 18 lines · Daniel Vetter
Quoted 17 lines · Ben Widawsky
Quoted 15 lines · Ben Widawsky
Quoted 6 lines · Damien Lespiau

Not implementing this W/A can lead to hangs.

Cc Ben Widawsky <[email protected]>
Cc Rafael Barbalho <[email protected]>
Cc Ville Syrjälä <[email protected]>

From reading the HSD, it's not a workaround. It was a spec bug. I presume the workaround name came from the workaround database? If it did not, I'd just drop any mention of "workaround." If it's in the workaround database, maybe just leave it so we can check later.

Either way:

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Oh, and I think CC: stable

Queued for -next, thanks for the patch.
-Daniel

You want/need this in bdw-backports?

Should take the normal stable backport path, so no need for special handling. Well, if it doesn't conflict, I didn't check that ;-) -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch