diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-01-07 09:14:08 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-07 16:20:33 -0500 |
commit | a42a57196ad897e7686944488b23f5d2b6496372 (patch) | |
tree | 5b4550a9e063353bc3c123b46ff9c4b5793bc121 /drivers/gpu/drm/i915/intel_pm.c | |
parent | 38cc1daf0c9d22b05b00fcb72744003d7b63fece (diff) |
drm/i915: Fix watermark code for BDW
Looks like I forgot to update the ILK/SNB/IVB watermark patches to deal
with BDW. Add the relevant BDW checks to make sure we take the HSW
codepaths on BDW as well.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index bbd6503a4cf5..78503157daf2 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -2012,7 +2012,7 @@ static void intel_read_wm_latency(struct drm_device *dev, uint16_t wm[5]) | |||
2012 | { | 2012 | { |
2013 | struct drm_i915_private *dev_priv = dev->dev_private; | 2013 | struct drm_i915_private *dev_priv = dev->dev_private; |
2014 | 2014 | ||
2015 | if (IS_HASWELL(dev)) { | 2015 | if (IS_HASWELL(dev) || IS_BROADWELL(dev)) { |
2016 | uint64_t sskpd = I915_READ64(MCH_SSKPD); | 2016 | uint64_t sskpd = I915_READ64(MCH_SSKPD); |
2017 | 2017 | ||
2018 | wm[0] = (sskpd >> 56) & 0xFF; | 2018 | wm[0] = (sskpd >> 56) & 0xFF; |
@@ -2060,7 +2060,7 @@ static void intel_fixup_cur_wm_latency(struct drm_device *dev, uint16_t wm[5]) | |||
2060 | static int ilk_wm_max_level(const struct drm_device *dev) | 2060 | static int ilk_wm_max_level(const struct drm_device *dev) |
2061 | { | 2061 | { |
2062 | /* how many WM levels are we expecting */ | 2062 | /* how many WM levels are we expecting */ |
2063 | if (IS_HASWELL(dev)) | 2063 | if (IS_HASWELL(dev) || IS_BROADWELL(dev)) |
2064 | return 4; | 2064 | return 4; |
2065 | else if (INTEL_INFO(dev)->gen >= 6) | 2065 | else if (INTEL_INFO(dev)->gen >= 6) |
2066 | return 3; | 2066 | return 3; |
@@ -2179,7 +2179,7 @@ static bool intel_compute_pipe_wm(struct drm_crtc *crtc, | |||
2179 | ilk_compute_wm_level(dev_priv, level, params, | 2179 | ilk_compute_wm_level(dev_priv, level, params, |
2180 | &pipe_wm->wm[level]); | 2180 | &pipe_wm->wm[level]); |
2181 | 2181 | ||
2182 | if (IS_HASWELL(dev)) | 2182 | if (IS_HASWELL(dev) || IS_BROADWELL(dev)) |
2183 | pipe_wm->linetime = hsw_compute_linetime_wm(dev, crtc); | 2183 | pipe_wm->linetime = hsw_compute_linetime_wm(dev, crtc); |
2184 | 2184 | ||
2185 | /* At least LP0 must be valid */ | 2185 | /* At least LP0 must be valid */ |
@@ -2274,7 +2274,7 @@ static unsigned int ilk_wm_lp_latency(struct drm_device *dev, int level) | |||
2274 | { | 2274 | { |
2275 | struct drm_i915_private *dev_priv = dev->dev_private; | 2275 | struct drm_i915_private *dev_priv = dev->dev_private; |
2276 | 2276 | ||
2277 | if (IS_HASWELL(dev)) | 2277 | if (IS_HASWELL(dev) || IS_BROADWELL(dev)) |
2278 | return 2 * level; | 2278 | return 2 * level; |
2279 | else | 2279 | else |
2280 | return dev_priv->wm.pri_latency[level]; | 2280 | return dev_priv->wm.pri_latency[level]; |
@@ -2489,7 +2489,7 @@ static void ilk_write_wm_values(struct drm_i915_private *dev_priv, | |||
2489 | I915_WRITE(PIPE_WM_LINETIME(PIPE_C), results->wm_linetime[2]); | 2489 | I915_WRITE(PIPE_WM_LINETIME(PIPE_C), results->wm_linetime[2]); |
2490 | 2490 | ||
2491 | if (dirty & WM_DIRTY_DDB) { | 2491 | if (dirty & WM_DIRTY_DDB) { |
2492 | if (IS_HASWELL(dev)) { | 2492 | if (IS_HASWELL(dev) || IS_BROADWELL(dev)) { |
2493 | val = I915_READ(WM_MISC); | 2493 | val = I915_READ(WM_MISC); |
2494 | if (results->partitioning == INTEL_DDB_PART_1_2) | 2494 | if (results->partitioning == INTEL_DDB_PART_1_2) |
2495 | val &= ~WM_MISC_DATA_PARTITION_5_6; | 2495 | val &= ~WM_MISC_DATA_PARTITION_5_6; |
@@ -2628,7 +2628,7 @@ static void ilk_pipe_wm_get_hw_state(struct drm_crtc *crtc) | |||
2628 | }; | 2628 | }; |
2629 | 2629 | ||
2630 | hw->wm_pipe[pipe] = I915_READ(wm0_pipe_reg[pipe]); | 2630 | hw->wm_pipe[pipe] = I915_READ(wm0_pipe_reg[pipe]); |
2631 | if (IS_HASWELL(dev)) | 2631 | if (IS_HASWELL(dev) || IS_BROADWELL(dev)) |
2632 | hw->wm_linetime[pipe] = I915_READ(PIPE_WM_LINETIME(pipe)); | 2632 | hw->wm_linetime[pipe] = I915_READ(PIPE_WM_LINETIME(pipe)); |
2633 | 2633 | ||
2634 | if (intel_crtc_active(crtc)) { | 2634 | if (intel_crtc_active(crtc)) { |
@@ -2675,7 +2675,7 @@ void ilk_wm_get_hw_state(struct drm_device *dev) | |||
2675 | hw->wm_lp_spr[1] = I915_READ(WM2S_LP_IVB); | 2675 | hw->wm_lp_spr[1] = I915_READ(WM2S_LP_IVB); |
2676 | hw->wm_lp_spr[2] = I915_READ(WM3S_LP_IVB); | 2676 | hw->wm_lp_spr[2] = I915_READ(WM3S_LP_IVB); |
2677 | 2677 | ||
2678 | if (IS_HASWELL(dev)) | 2678 | if (IS_HASWELL(dev) || IS_BROADWELL(dev)) |
2679 | hw->partitioning = (I915_READ(WM_MISC) & WM_MISC_DATA_PARTITION_5_6) ? | 2679 | hw->partitioning = (I915_READ(WM_MISC) & WM_MISC_DATA_PARTITION_5_6) ? |
2680 | INTEL_DDB_PART_5_6 : INTEL_DDB_PART_1_2; | 2680 | INTEL_DDB_PART_5_6 : INTEL_DDB_PART_1_2; |
2681 | else if (IS_IVYBRIDGE(dev)) | 2681 | else if (IS_IVYBRIDGE(dev)) |