Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1511810
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.8 024/125] drm/i915/gen9: fix the WaWmMemoryReadLatency implementation |
| Date | 2016-10-29 16:30 +0200 |
| Message-ID | <sxCNY-7nb-49@gated-at.bofh.it> (permalink) |
| References | <sxCkV-6TH-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
commit 4e4d3814a9bb4d71cd3ff0701d8d7041edefd8f0 upstream.
Bspec says:
"The mailbox response data may not account for memory read latency.
If the mailbox response data for level 0 is 0us, add 2 microseconds
to the result for each valid level."
This means we should only do the +2 in case wm[0] == 0, not always.
So split the sanitizing implementation from the WA implementation and
fix the WA implementation.
v2: Add Fixes tag (Maarten).
Fixes: 367294be7c25 ("drm/i915/gen9: Add 2us read latency to WM level")
Cc: Vandana Kannan <vandana.kannan@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-5-git-send-email-paulo.r.zanoni@intel.com
(cherry picked from commit 0727e40a48a1d08cf54ce2c01e120864b92e59bf)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_pm.c | 42 ++++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 20 deletions(-)
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2119,32 +2119,34 @@ static void intel_read_wm_latency(struct
GEN9_MEM_LATENCY_LEVEL_MASK;
/*
+ * If a level n (n > 1) has a 0us latency, all levels m (m >= n)
+ * need to be disabled. We make sure to sanitize the values out
+ * of the punit to satisfy this requirement.
+ */
+ for (level = 1; level <= max_level; level++) {
+ if (wm[level] == 0) {
+ for (i = level + 1; i <= max_level; i++)
+ wm[i] = 0;
+ break;
+ }
+ }
+
+ /*
* WaWmMemoryReadLatency:skl
*
* punit doesn't take into account the read latency so we need
- * to add 2us to the various latency levels we retrieve from
- * the punit.
- * - W0 is a bit special in that it's the only level that
- * can't be disabled if we want to have display working, so
- * we always add 2us there.
- * - For levels >=1, punit returns 0us latency when they are
- * disabled, so we respect that and don't add 2us then
- *
- * Additionally, if a level n (n > 1) has a 0us latency, all
- * levels m (m >= n) need to be disabled. We make sure to
- * sanitize the values out of the punit to satisfy this
- * requirement.
+ * to add 2us to the various latency levels we retrieve from the
+ * punit when level 0 response data us 0us.
*/
- wm[0] += 2;
- for (level = 1; level <= max_level; level++)
- if (wm[level] != 0)
+ if (wm[0] == 0) {
+ wm[0] += 2;
+ for (level = 1; level <= max_level; level++) {
+ if (wm[level] == 0)
+ break;
wm[level] += 2;
- else {
- for (i = level + 1; i <= max_level; i++)
- wm[i] = 0;
-
- break;
}
+ }
+
} else if (IS_HASWELL(dev) || IS_BROADWELL(dev)) {
uint64_t sskpd = I915_READ64(MCH_SSKPD);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.8 000/125] 4.8.6-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-29 16:20 +0200
[PATCH 4.8 051/125] ath10k: Add WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT wmi service Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-29 16:20 +0200
[PATCH 4.8 017/125] drm/amd/powerplay: fix mclk not switching back after multi-head was disabled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-29 16:20 +0200
[PATCH 4.8 058/125] crypto: arm/ghash-ce - add missing async import/export Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-29 16:20 +0200
[PATCH 4.8 024/125] drm/i915/gen9: fix the WaWmMemoryReadLatency implementation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-29 16:30 +0200
Re: [PATCH 4.8 000/125] 4.8.6-stable review Shuah Khan <shuah.kh@samsung.com> - 2016-10-30 01:10 +0200
Re: [PATCH 4.8 000/125] 4.8.6-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-30 11:30 +0100
Re: [PATCH 4.8 000/125] 4.8.6-stable review Guenter Roeck <linux@roeck-us.net> - 2016-10-30 02:50 +0200
Re: [PATCH 4.8 000/125] 4.8.6-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-10-30 11:30 +0100
csiph-web