Skip to contentSkip to conversation

drm/i915/cnl: WaRsUseTimeoutMode

PATCH In review Rodrigo Vivi 4 participants 8 messages Aug 22, 2017 – Oct 17, 2017

Subsystems (2)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/1 drm/i915/cnl: WaRsUseTimeoutMode

Apparently RC6 residency is lower than expected with EI mode for most of the cases on CNL A0, B0 and C0.

This Wa doesn't solve our lower residency, but I believe it is better to have it since EI is not expected to work by HW engineers anyways.

Cc David Weinehall <[email protected]>
Cc Mika Kuoppala <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.h |  1 +
 drivers/gpu/drm/i915/intel_pm.c | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 7587ef53026b..cb017b7d8ccb 100644
@@ -2967,6 +2967,7 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define CNL_REVID_A0		0x0
 #define CNL_REVID_B0		0x1
+#define CNL_REVID_C0		0x2
 
 #define IS_CNL_REVID(p, since, until) \
 	(IS_CANNONLAKE(p) && IS_REVID(p, since, until))
drivers/gpu/drm/i915/intel_pm.c +9 -2
index d5ff0b9f999f..8c6d74d94799 100644
@@ -6456,7 +6456,7 @@ static void gen9_enable_rc6(struct drm_i915_private *dev_priv)
 {
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
-	uint32_t rc6_mask = 0;
+	u32 rc6_mode, rc6_mask = 0;
 
 	/* 1a: Software RC state - RC0 */
 	I915_WRITE(GEN6_RC_STATE, 0);
@@ -6494,8 +6494,15 @@ static void gen9_enable_rc6(struct drm_i915_private *dev_priv)
 		rc6_mask = GEN6_RC_CTL_RC6_ENABLE;
 	DRM_INFO("RC6 %s\n", onoff(rc6_mask & GEN6_RC_CTL_RC6_ENABLE));
 	I915_WRITE(GEN6_RC6_THRESHOLD, 37500); /* 37.5/125ms per EI */
+
+	/* WaRsUseTimeoutMode:cnl (pre-prod) */
+	if (IS_CNL_REVID(dev_priv, CNL_REVID_A0, CNL_REVID_C0))
+		rc6_mode = GEN7_RC_CTL_TO_MODE;
+	else
+		rc6_mode = GEN6_RC_CTL_EI_MODE(1);
+
 	I915_WRITE(GEN6_RC_CONTROL,
-		   GEN6_RC_CTL_HW_ENABLE | GEN6_RC_CTL_EI_MODE(1) | rc6_mask);
+		   GEN6_RC_CTL_HW_ENABLE | rc6_mode | rc6_mask);
 
 	/*
 	 * 3b: Enable Coarse Power Gating only when RC6 is enabled.
Signature · 6 lines
2.13.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915/cnl: WaRsUseTimeoutMode

== Series Details ==

== Series Details ==

Series: drm/i915/cnl: WaRsUseTimeoutMode
URL : https://patchwork.freedesktop.org/series/29185/
State : success

== Summary ==

Series 29185v1 drm/i915/cnl: WaRsUseTimeoutMode
https://patchwork.freedesktop.org/api/1.0/series/29185/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-flip-vs-modeset:
                skip       -> PASS       (fi-skl-x1585l) fdo#101781
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                dmesg-warn -> PASS       (fi-byt-n2820) fdo#101705

fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705

fi-bdw-5557u     total:279  pass:268  dwarn:0   dfail:0   fail:0   skip:11  time:453s
fi-bdw-gvtdvm    total:279  pass:265  dwarn:0   dfail:0   fail:0   skip:14  time:443s
fi-blb-e6850     total:279  pass:224  dwarn:1   dfail:0   fail:0   skip:54  time:358s
fi-bsw-n3050     total:279  pass:243  dwarn:0   dfail:0   fail:0   skip:36  time:557s
fi-bwr-2160      total:279  pass:184  dwarn:0   dfail:0   fail:0   skip:95  time:254s
fi-bxt-j4205     total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:528s
fi-byt-j1900     total:279  pass:254  dwarn:1   dfail:0   fail:0   skip:24  time:526s
fi-byt-n2820     total:279  pass:251  dwarn:0   dfail:0   fail:0   skip:28  time:516s
fi-elk-e7500     total:279  pass:230  dwarn:0   dfail:0   fail:0   skip:49  time:436s
fi-glk-2a        total:279  pass:260  dwarn:0   dfail:0   fail:0   skip:19  time:612s
fi-hsw-4770      total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:443s
fi-hsw-4770r     total:279  pass:263  dwarn:0   dfail:0   fail:0   skip:16  time:429s
fi-ilk-650       total:279  pass:229  dwarn:0   dfail:0   fail:0   skip:50  time:419s
fi-ivb-3520m     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:503s
fi-ivb-3770      total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:473s
fi-kbl-7260u     total:279  pass:268  dwarn:1   dfail:0   fail:0   skip:10  time:498s
fi-kbl-7500u     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:472s
fi-kbl-7560u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:598s
fi-kbl-r         total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:598s
fi-pnv-d510      total:279  pass:223  dwarn:1   dfail:0   fail:0   skip:55  time:531s
fi-skl-6260u     total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:468s
fi-skl-6700k     total:279  pass:261  dwarn:0   dfail:0   fail:0   skip:18  time:478s
fi-skl-6770hq    total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:483s
fi-skl-gvtdvm    total:279  pass:266  dwarn:0   dfail:0   fail:0   skip:13  time:441s
fi-skl-x1585l    total:279  pass:269  dwarn:0   dfail:0   fail:0   skip:10  time:504s
fi-snb-2520m     total:279  pass:251  dwarn:0   dfail:0   fail:0   skip:28  time:550s
fi-snb-2600      total:279  pass:250  dwarn:0   dfail:0   fail:0   skip:29  time:408s

489147dfdcc735baf773a6ec3698cf85a01d7008 drm-tip: 2017y-08m-22d-18h-44m-32s UTC integration manifest ee788addbad5 drm/i915/cnl: WaRsUseTimeoutMode

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5471/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to Rodrigo Vivi
Quoted 10 lines · Rodrigo Vivi

Apparently RC6 residency is lower than expected with EI mode for most of the cases on CNL A0, B0 and C0.

This Wa doesn't solve our lower residency, but I believe it is better to have it since EI is not expected to work by HW engineers anyways.

Cc David Weinehall <[email protected]>
Cc Mika Kuoppala <[email protected]>

Sorry, I totally missed out on this one earlier. Looks correct, and I've tested the patch on our CNL-Y without noticing any regressions.

Quoted 50 lines
---
 drivers/gpu/drm/i915/i915_drv.h |  1 +
 drivers/gpu/drm/i915/intel_pm.c | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 7587ef53026b..cb017b7d8ccb 100644
@@ -2967,6 +2967,7 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define CNL_REVID_A0		0x0
 #define CNL_REVID_B0		0x1
+#define CNL_REVID_C0		0x2
 
 #define IS_CNL_REVID(p, since, until) \
 	(IS_CANNONLAKE(p) && IS_REVID(p, since, until))
drivers/gpu/drm/i915/intel_pm.c +9 -2
index d5ff0b9f999f..8c6d74d94799 100644
@@ -6456,7 +6456,7 @@ static void gen9_enable_rc6(struct drm_i915_private *dev_priv)
 {
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
-	uint32_t rc6_mask = 0;
+	u32 rc6_mode, rc6_mask = 0;
 
 	/* 1a: Software RC state - RC0 */
 	I915_WRITE(GEN6_RC_STATE, 0);
@@ -6494,8 +6494,15 @@ static void gen9_enable_rc6(struct drm_i915_private *dev_priv)
 		rc6_mask = GEN6_RC_CTL_RC6_ENABLE;
 	DRM_INFO("RC6 %s\n", onoff(rc6_mask & GEN6_RC_CTL_RC6_ENABLE));
 	I915_WRITE(GEN6_RC6_THRESHOLD, 37500); /* 37.5/125ms per EI */
+
+	/* WaRsUseTimeoutMode:cnl (pre-prod) */
+	if (IS_CNL_REVID(dev_priv, CNL_REVID_A0, CNL_REVID_C0))
+		rc6_mode = GEN7_RC_CTL_TO_MODE;
+	else
+		rc6_mode = GEN6_RC_CTL_EI_MODE(1);
+
 	I915_WRITE(GEN6_RC_CONTROL,
-		   GEN6_RC_CTL_HW_ENABLE | GEN6_RC_CTL_EI_MODE(1) | rc6_mask);
+		   GEN6_RC_CTL_HW_ENABLE | rc6_mode | rc6_mask);
 
 	/*
 	 * 3b: Enable Coarse Power Gating only when RC6 is enabled.
Signature · 1 line
2.13.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author maintainer Applied
#3 lore raw
Quoted 12 lines · David Weinehall
Quoted 10 lines · Rodrigo Vivi

Apparently RC6 residency is lower than expected with EI mode for most of the cases on CNL A0, B0 and C0.

This Wa doesn't solve our lower residency, but I believe it is better to have it since EI is not expected to work by HW engineers anyways.

Cc David Weinehall <[email protected]>
Cc Mika Kuoppala <[email protected]>
Quoted 5 lines

Sorry, I totally missed out on this one earlier. Looks correct, and I've tested the patch on our CNL-Y without noticing any regressions.

merged to dinq. Thanks.

Quoted 46 lines
Quoted 46 lines
---
 drivers/gpu/drm/i915/i915_drv.h |  1 +
 drivers/gpu/drm/i915/intel_pm.c | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 7587ef53026b..cb017b7d8ccb 100644
@@ -2967,6 +2967,7 @@ intel_info(const struct drm_i915_private *dev_priv)
 
 #define CNL_REVID_A0		0x0
 #define CNL_REVID_B0		0x1
+#define CNL_REVID_C0		0x2
 
 #define IS_CNL_REVID(p, since, until) \
 	(IS_CANNONLAKE(p) && IS_REVID(p, since, until))
drivers/gpu/drm/i915/intel_pm.c +9 -2
index d5ff0b9f999f..8c6d74d94799 100644
@@ -6456,7 +6456,7 @@ static void gen9_enable_rc6(struct drm_i915_private *dev_priv)
 {
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
-	uint32_t rc6_mask = 0;
+	u32 rc6_mode, rc6_mask = 0;
 
 	/* 1a: Software RC state - RC0 */
 	I915_WRITE(GEN6_RC_STATE, 0);
@@ -6494,8 +6494,15 @@ static void gen9_enable_rc6(struct drm_i915_private *dev_priv)
 		rc6_mask = GEN6_RC_CTL_RC6_ENABLE;
 	DRM_INFO("RC6 %s\n", onoff(rc6_mask & GEN6_RC_CTL_RC6_ENABLE));
 	I915_WRITE(GEN6_RC6_THRESHOLD, 37500); /* 37.5/125ms per EI */
+
+	/* WaRsUseTimeoutMode:cnl (pre-prod) */
+	if (IS_CNL_REVID(dev_priv, CNL_REVID_A0, CNL_REVID_C0))
+		rc6_mode = GEN7_RC_CTL_TO_MODE;
+	else
+		rc6_mode = GEN6_RC_CTL_EI_MODE(1);
+
 	I915_WRITE(GEN6_RC_CONTROL,
-		   GEN6_RC_CTL_HW_ENABLE | GEN6_RC_CTL_EI_MODE(1) | rc6_mask);
+		   GEN6_RC_CTL_HW_ENABLE | rc6_mode | rc6_mask);
 
Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
 	/*
 	 * 3b: Enable Coarse Power Gating only when RC6 is enabled.
Signature · 1 line
2.13.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Quoting Rodrigo Vivi (2017-10-16 19:16:58)

Quoted 8 lines · David Weinehall
Quoted 7 lines · Rodrigo Vivi
Quoted 6 lines

Apparently RC6 residency is lower than expected with EI mode for most of the cases on CNL A0, B0 and C0.

This Wa doesn't solve our lower residency, but I believe it is better to have it since EI is not expected to work by HW engineers anyways.

Aside, this has nothing* to do with rc6; this is changing the decision to up/down clock to a metric that is out of kilter with the code.

*Ok, you can make an indirect claim about race-to-idle and the rc6 hysteresis.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Quoting Chris Wilson (2017-10-16 20:54:59)

Quoted 10 lines

Quoting Rodrigo Vivi (2017-10-16 19:16:58)

Quoted 8 lines · David Weinehall
Quoted 7 lines · Rodrigo Vivi
Quoted 6 lines

Apparently RC6 residency is lower than expected with EI mode for most of the cases on CNL A0, B0 and C0.

This Wa doesn't solve our lower residency, but I believe it is better to have it since EI is not expected to work by HW engineers anyways.

Quoted 5 lines

Aside, this has nothing* to do with rc6; this is changing the decision to up/down clock to a metric that is out of kilter with the code.

*Ok, you can make an indirect claim about race-to-idle and the rc6 hysteresis.

Egg on face; wrong register, wrong EI/TO decision. -Chris
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author maintainer
#6 lore raw
Quoted 11 lines · Chris Wilson

Quoting Chris Wilson (2017-10-16 20:54:59)

Quoted 10 lines

Quoting Rodrigo Vivi (2017-10-16 19:16:58)

Quoted 8 lines · David Weinehall
Quoted 7 lines · Rodrigo Vivi
Quoted 6 lines

Apparently RC6 residency is lower than expected with EI mode for most of the cases on CNL A0, B0 and C0.

This Wa doesn't solve our lower residency, but I believe it is better to have it since EI is not expected to work by HW engineers anyways.

Quoted 7 lines
Quoted 5 lines

Aside, this has nothing* to do with rc6; this is changing the decision to up/down clock to a metric that is out of kilter with the code.

*Ok, you can make an indirect claim about race-to-idle and the rc6 hysteresis.

Egg on face; wrong register, wrong EI/TO decision.

I didn't follow, sorry.
Do I need to revert this?
Where should I look instead?

Quoted 1 line

-Chris

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

Quoting Rodrigo Vivi (2017-10-17 00:32:54)

Quoted 15 lines · Chris Wilson
Quoted 14 lines

Quoting Chris Wilson (2017-10-16 20:54:59)

Quoted 13 lines

Quoting Rodrigo Vivi (2017-10-16 19:16:58)

Quoted 8 lines · David Weinehall
Quoted 7 lines · Rodrigo Vivi
Quoted 6 lines

Apparently RC6 residency is lower than expected with EI mode for most of the cases on CNL A0, B0 and C0.

This Wa doesn't solve our lower residency, but I believe it is better to have it since EI is not expected to work by HW engineers anyways.

Aside, this has nothing* to do with rc6; this is changing the decision to up/down clock to a metric that is out of kilter with the code.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

*Ok, you can make an indirect claim about race-to-idle and the rc6 hysteresis.

Egg on face; wrong register, wrong EI/TO decision.

I didn't follow, sorry.

Egg on face == my mistake, I took this was changing between Evaluation Interval and Timeout for the RPS metrics. I had always associated rc6 with the timeout method.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx