Skip to contentSkip to conversation

drm/i915: Add a partial instruction shootdown workaround on Broadwell.

PATCH In review Kenneth Graunke 4 participants 7 messages Feb 27, 2014 – Mar 5, 2014

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

PATCH 1/2 drm/i915: Add a partial instruction shootdown workaround on Broadwell.

I believe this will be necessary on production hardware.

---
 drivers/gpu/drm/i915/i915_reg.h | 3 +++
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 7 insertions(+)

I just realized tonight that my workarounds series never got merged.

After reviewing Ben and Chris's comments, I agree with all of them, so I've dropped the unnecessary patches. I also believe I shouldn't need the pre-production workarounds I sent last time, so I've dropped those.

These two should apply to production hardware, so we probably want them.

drivers/gpu/drm/i915/i915_reg.h +3 -0
index ad75ff7..f36d5e0 100644
@@ -5050,6 +5050,9 @@
 #define   GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE	(1<<10)
 #define   GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE	(1<<3)
 
+#define GEN8_ROW_CHICKEN		0xe4f0
+#define   PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE	(1<<8)
+
 #define GEN7_ROW_CHICKEN2		0xe4f4
 #define GEN7_ROW_CHICKEN2_GT2		0xf4f4
 #define   DOP_CLOCK_GATING_DISABLE	(1<<0)
drivers/gpu/drm/i915/intel_pm.c +4 -0
index 4f01b04..df8ad21 100644
@@ -4838,6 +4838,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	/* FIXME(BDW): Check all the w/a, some might only apply to
 	 * pre-production hw. */
 
+	/* WaDisablePartialInstShootdown */
+	I915_WRITE(GEN8_ROW_CHICKEN,
+	           _MASKED_BIT_ENABLE(PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE));
+
 	/*
 	 * This GEN8_CENTROID_PIXEL_OPT_DIS W/A is only needed for
 	 * pre-production hardware
Signature · 1 line
1.8.4.2
#1 lore raw

PATCH 2/2 drm/i915: Add thread stall DOP clock gating workaround on Broadwell.

Ben and I believe this will be necessary on production hardware.

---
 drivers/gpu/drm/i915/i915_reg.h | 1 +
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index f36d5e0..ade1d71 100644
@@ -5052,6 +5052,7 @@
 
 #define GEN8_ROW_CHICKEN		0xe4f0
 #define   PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE	(1<<8)
+#define   STALL_DOP_GATING_DISABLE		(1<<5)
 
 #define GEN7_ROW_CHICKEN2		0xe4f4
 #define GEN7_ROW_CHICKEN2_GT2		0xf4f4
drivers/gpu/drm/i915/intel_pm.c +4 -0
index df8ad21..226591d 100644
@@ -4842,6 +4842,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN8_ROW_CHICKEN,
 	           _MASKED_BIT_ENABLE(PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE));
 
+	/* WaDisableThreadStallDopClockGating:bdw */
+	I915_WRITE(GEN8_ROW_CHICKEN,
+		   _MASKED_BIT_ENABLE(STALL_DOP_GATING_DISABLE));
+
 	/*
 	 * This GEN8_CENTROID_PIXEL_OPT_DIS W/A is only needed for
 	 * pre-production hardware
Signature · 1 line
1.8.4.2
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] drm/i915: Add thread stall DOP clock gating workaround on Broadwell.

Quoted 25 lines · Kenneth Graunke

Ben and I believe this will be necessary on production hardware.

---
 drivers/gpu/drm/i915/i915_reg.h | 1 +
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index f36d5e0..ade1d71 100644
@@ -5052,6 +5052,7 @@
 
 #define GEN8_ROW_CHICKEN		0xe4f0
 #define   PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE	(1<<8)
+#define   STALL_DOP_GATING_DISABLE		(1<<5)
 
 #define GEN7_ROW_CHICKEN2		0xe4f4
 #define GEN7_ROW_CHICKEN2_GT2		0xf4f4
drivers/gpu/drm/i915/intel_pm.c +0 -0
index df8ad21..226591d 100644

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 4847

Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +3 -0
@@ -4842,6 +4842,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN8_ROW_CHICKEN,
 	           _MASKED_BIT_ENABLE(PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE));
 
+	/* WaDisableThreadStallDopClockGating:bdw */
+	I915_WRITE(GEN8_ROW_CHICKEN,
+		   _MASKED_BIT_ENABLE(STALL_DOP_GATING_DISABLE));

The spec and w/a database are a bit confused on this, but I get the impression that you're correct. So:

Quoted 11 lines
drivers/gpu/drm/i915/intel_pm.c +1 -0
+
 	/*
 	 * This GEN8_CENTROID_PIXEL_OPT_DIS W/A is only needed for
 	 * pre-production hardware
Signature · 6 lines
1.8.4.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC
#3 lore raw

Re: [PATCH 2/2] drm/i915: Add thread stall DOP clock gating workaround on Broadwell.

Quoted 29 lines · Ville Syrjälä
Quoted 28 lines · Kenneth Graunke

Ben and I believe this will be necessary on production hardware.

---
 drivers/gpu/drm/i915/i915_reg.h | 1 +
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index f36d5e0..ade1d71 100644
@@ -5052,6 +5052,7 @@
 
 #define GEN8_ROW_CHICKEN		0xe4f0
 #define   PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE	(1<<8)
+#define   STALL_DOP_GATING_DISABLE		(1<<5)
 
 #define GEN7_ROW_CHICKEN2		0xe4f4
 #define GEN7_ROW_CHICKEN2_GT2		0xf4f4
drivers/gpu/drm/i915/intel_pm.c +0 -0
index df8ad21..226591d 100644
@@ -4842,6 +4842,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN8_ROW_CHICKEN,
 	           _MASKED_BIT_ENABLE(PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE));
 
Quoted 8 lines

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 4847

Quoted 3 lines
drivers/gpu/drm/i915/intel_pm.c +3 -0
+	/* WaDisableThreadStallDopClockGating:bdw */
+	I915_WRITE(GEN8_ROW_CHICKEN,
+		   _MASKED_BIT_ENABLE(STALL_DOP_GATING_DISABLE));

The spec and w/a database are a bit confused on this, but I get the impression that you're correct. So:

Actually I might have to take that back a bit. Looks more like it shouldn't be needed for production hardware, but I'm guessing people currently have hardware that needs it, so we should have it at least for now.

Quoted 16 lines
Quoted 12 lines
drivers/gpu/drm/i915/intel_pm.c +1 -0
+
 	/*
 	 * This GEN8_CENTROID_PIXEL_OPT_DIS W/A is only needed for
 	 * pre-production hardware
Signature · 6 lines
1.8.4.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC
Signature · 2 lines
Ville Syrjälä
Intel OTC
Reviewed-by on v1 1/2
#4 lore raw
In reply to Kenneth Graunke
Quoted 35 lines · Kenneth Graunke

I believe this will be necessary on production hardware.

---
 drivers/gpu/drm/i915/i915_reg.h | 3 +++
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 7 insertions(+)

I just realized tonight that my workarounds series never got merged.

After reviewing Ben and Chris's comments, I agree with all of them, so I've dropped the unnecessary patches. I also believe I shouldn't need the pre-production workarounds I sent last time, so I've dropped those.

These two should apply to production hardware, so we probably want them.

drivers/gpu/drm/i915/i915_reg.h +3 -0
index ad75ff7..f36d5e0 100644
@@ -5050,6 +5050,9 @@
 #define   GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE	(1<<10)
 #define   GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE	(1<<3)
 
+#define GEN8_ROW_CHICKEN		0xe4f0
+#define   PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE	(1<<8)
+
 #define GEN7_ROW_CHICKEN2		0xe4f4
 #define GEN7_ROW_CHICKEN2_GT2		0xf4f4
 #define   DOP_CLOCK_GATING_DISABLE	(1<<0)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index 4f01b04..df8ad21 100644

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 4841

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +1 -0
@@ -4838,6 +4838,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	/* FIXME(BDW): Check all the w/a, some might only apply to
 	 * pre-production hw. */
 
+	/* WaDisablePartialInstShootdown */

+:bdw

Apart from that:

Quoted 13 lines
drivers/gpu/drm/i915/intel_pm.c +3 -0
+	I915_WRITE(GEN8_ROW_CHICKEN,
+	           _MASKED_BIT_ENABLE(PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE));
+
 	/*
 	 * This GEN8_CENTROID_PIXEL_OPT_DIS W/A is only needed for
 	 * pre-production hardware
Signature · 6 lines
1.8.4.2

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä
Intel OTC
Reviewed-by
#5 lore raw
Quoted 39 lines · Ville Syrjälä
Quoted 38 lines · Kenneth Graunke

I believe this will be necessary on production hardware.

---
 drivers/gpu/drm/i915/i915_reg.h | 3 +++
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 7 insertions(+)

I just realized tonight that my workarounds series never got merged.

After reviewing Ben and Chris's comments, I agree with all of them, so I've dropped the unnecessary patches. I also believe I shouldn't need the pre-production workarounds I sent last time, so I've dropped those.

These two should apply to production hardware, so we probably want them.

drivers/gpu/drm/i915/i915_reg.h +3 -0
index ad75ff7..f36d5e0 100644
@@ -5050,6 +5050,9 @@
 #define   GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE	(1<<10)
 #define   GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE	(1<<3)
 
+#define GEN8_ROW_CHICKEN		0xe4f0
+#define   PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE	(1<<8)
+
 #define GEN7_ROW_CHICKEN2		0xe4f4
 #define GEN7_ROW_CHICKEN2_GT2		0xf4f4
 #define   DOP_CLOCK_GATING_DISABLE	(1<<0)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index 4f01b04..df8ad21 100644
@@ -4838,6 +4838,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	/* FIXME(BDW): Check all the w/a, some might only apply to
 	 * pre-production hw. */
 
Quoted 7 lines

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 4841

Quoted 1 line
drivers/gpu/drm/i915/intel_pm.c +1 -0
+	/* WaDisablePartialInstShootdown */

+:bdw

Apart from that:

I think they're both stable material.
And:

Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw
Quoted 40 lines · Ben Widawsky
Quoted 39 lines · Ville Syrjälä
Quoted 38 lines · Kenneth Graunke

I believe this will be necessary on production hardware.

---
 drivers/gpu/drm/i915/i915_reg.h | 3 +++
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 7 insertions(+)

I just realized tonight that my workarounds series never got merged.

After reviewing Ben and Chris's comments, I agree with all of them, so I've dropped the unnecessary patches. I also believe I shouldn't need the pre-production workarounds I sent last time, so I've dropped those.

These two should apply to production hardware, so we probably want them.

drivers/gpu/drm/i915/i915_reg.h +3 -0
index ad75ff7..f36d5e0 100644
@@ -5050,6 +5050,9 @@
 #define   GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE	(1<<10)
 #define   GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE	(1<<3)
 
+#define GEN8_ROW_CHICKEN		0xe4f0
+#define   PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE	(1<<8)
+
 #define GEN7_ROW_CHICKEN2		0xe4f4
 #define GEN7_ROW_CHICKEN2_GT2		0xf4f4
 #define   DOP_CLOCK_GATING_DISABLE	(1<<0)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index 4f01b04..df8ad21 100644
@@ -4838,6 +4838,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)
 	/* FIXME(BDW): Check all the w/a, some might only apply to
 	 * pre-production hw. */
 
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/i915/intel_pm.c static void gen8_init_clock_gating(struct drm_device *dev) · line 4841

Quoted 1 line
drivers/gpu/drm/i915/intel_pm.c +1 -0
+	/* WaDisablePartialInstShootdown */

out of curiousity: Does ROW_CHICKEN survive a gpu reset? We've had fun with this kind of stuff before ...

Quoted 10 lines
Quoted 6 lines

+:bdw

Apart from that:

I think they're both stable material.
And:

Both merged to dinq. bdw in 3.13 is prelim, so would only need to go into 3.14-fixes. But there's too much bdw fixes floating (iirc 10 patches) that some time to settle everything looks like the right approach.

I guess as the platform owner you're then signed up to assemeble a backports branch for 3.14-bdw.
-Daniel

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