aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_pm.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2017-08-09 16:52:43 -0400
committerRodrigo Vivi <rodrigo.vivi@intel.com>2017-08-10 16:59:27 -0400
commit50682ee63fa3480b0541d0a311239189634b68ab (patch)
tree17167fc9f2d9a7721351b1297c61b5510f68ba4f /drivers/gpu/drm/i915/intel_pm.c
parent06bfe5b0d892f8120172380694eb66eeb23baf90 (diff)
drm/i915/gen10+: use the SKL code for reading WM latencies
Gen 10 should use the exact same code as Gen 9, so change the check to take this into consideration, and also assume that future platforms will run this code. Also add a MISSING_CASE(), just in case we do something wrong, instead of silently failing. Cc: Mahesh Kumar <mahesh1.kumar@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170809205248.11917-1-rodrigo.vivi@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 4a75b673b85f..04697faee4e6 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2778,7 +2778,7 @@ hsw_compute_linetime_wm(const struct intel_crtc_state *cstate)
2778static void intel_read_wm_latency(struct drm_i915_private *dev_priv, 2778static void intel_read_wm_latency(struct drm_i915_private *dev_priv,
2779 uint16_t wm[8]) 2779 uint16_t wm[8])
2780{ 2780{
2781 if (IS_GEN9(dev_priv)) { 2781 if (INTEL_GEN(dev_priv) >= 9) {
2782 uint32_t val; 2782 uint32_t val;
2783 int ret, i; 2783 int ret, i;
2784 int level, max_level = ilk_wm_max_level(dev_priv); 2784 int level, max_level = ilk_wm_max_level(dev_priv);
@@ -2838,7 +2838,7 @@ static void intel_read_wm_latency(struct drm_i915_private *dev_priv,
2838 } 2838 }
2839 2839
2840 /* 2840 /*
2841 * WaWmMemoryReadLatency:skl,glk 2841 * WaWmMemoryReadLatency:skl+,glk
2842 * 2842 *
2843 * punit doesn't take into account the read latency so we need 2843 * punit doesn't take into account the read latency so we need
2844 * to add 2us to the various latency levels we retrieve from the 2844 * to add 2us to the various latency levels we retrieve from the
@@ -2877,6 +2877,8 @@ static void intel_read_wm_latency(struct drm_i915_private *dev_priv,
2877 wm[0] = 7; 2877 wm[0] = 7;
2878 wm[1] = (mltr >> MLTR_WM1_SHIFT) & ILK_SRLT_MASK; 2878 wm[1] = (mltr >> MLTR_WM1_SHIFT) & ILK_SRLT_MASK;
2879 wm[2] = (mltr >> MLTR_WM2_SHIFT) & ILK_SRLT_MASK; 2879 wm[2] = (mltr >> MLTR_WM2_SHIFT) & ILK_SRLT_MASK;
2880 } else {
2881 MISSING_CASE(INTEL_DEVID(dev_priv));
2880 } 2882 }
2881} 2883}
2882 2884