From: kai.chen@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: Raise RPS FUp Interrupt Limiter for GEN9LP above softmax (v2)
Date: Thu, 6 Sep 2018 17:12:41 -0700 [thread overview]
Message-ID: <20180907001241.27857-1-kai.chen@intel.com> (raw)
From: Kai Chen <kai.chen@intel.com>
On GEN9LP, raise the RPS FUp Interrupt Limiter above softmax so that the
HW won't miss interrupt when requested max_freq is set back to RP0
value.
The (v2) is to explain a bit more detail background about the change in
the code.
Signed-off-by: Kai Chen <kai.chen@intel.com>
---
drivers/gpu/drm/i915/intel_pm.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index d99e5fabe93c..6574696b83cb 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -6276,7 +6276,27 @@ static u32 intel_rps_limits(struct drm_i915_private *dev_priv, u8 val)
* frequency, if the down threshold expires in that window we will not
* receive a down interrupt. */
if (INTEL_GEN(dev_priv) >= 9) {
- limits = (rps->max_freq_softlimit) << 23;
+ int max_freq = rps->max_freq_softlimit;
+ int rp0_freq = rps->rp0_freq;
+
+ if (IS_GEN9_LP(dev_priv) && (max_freq == rp0_freq))
+ /* For GEN9_LP, the HW seems insensitive to the RP FUp
+ * interrupt limiter threshold by design. This symptom
+ * is experienced in the IGT test (pm_rps): when the
+ * test sets the max_freq back to RP0, the interrupt
+ * limits register is also programmed to the max_freq
+ * per design. But as a result, the actual freq is not
+ * the max_freq detected. It is suggested (based on the
+ * best test/tuning practice) to increase the upper
+ * interrupt limiter just by 1 (16.6MHz) so that the HW
+ * will generate an interrupt when we are near or just
+ * below the upper limit.
+ */
+
+ limits = (rps->max_freq_softlimit + 1) << 23;
+ else
+ limits = (rps->max_freq_softlimit) << 23;
+
if (val <= rps->min_freq_softlimit)
limits |= (rps->min_freq_softlimit) << 14;
} else {
--
2.17.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2018-09-07 0:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 0:12 kai.chen [this message]
2018-09-07 0:35 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Raise RPS FUp Interrupt Limiter for GEN9LP above softmax (rev2) Patchwork
2018-09-07 0:52 ` ✓ Fi.CI.BAT: success " Patchwork
2018-09-07 2:02 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180907001241.27857-1-kai.chen@intel.com \
--to=kai.chen@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox