aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2014-12-19 12:33:27 -0500
committerJani Nikula <jani.nikula@intel.com>2015-01-12 03:52:41 -0500
commitf24eeb191229b040deb3e813913e06a4316c6d3f (patch)
treec7cc537fec0b8eb1f9bec3a33d3998021b4af86e
parent59d02a1f45beb1b6f4ef83a47feb264cb3577725 (diff)
drm/i915: vlv: sanitize RPS interrupt mask during GPU idling
We apply the RPS interrupt workaround on VLV everywhere except when writing the mask directly during idling the GPU. For consistency do this also there. While at it also extend the code comment about affected platforms. I couldn't reproduce the issue on VLV fixed by this workaround, by removing the workaround from everywhere, while it's 100% reproducible on SNB using igt/gem_reset_stats/ban-ctx-render. So also add a note that it hasn't been verified if the workaround really applies to VLV/CHV. Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c4
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index ba86dc330547..b051a238baf9 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -295,8 +295,10 @@ void gen6_enable_rps_interrupts(struct drm_device *dev)
295u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *dev_priv, u32 mask) 295u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *dev_priv, u32 mask)
296{ 296{
297 /* 297 /*
298 * IVB and SNB hard hangs on looping batchbuffer 298 * SNB,IVB can while VLV,CHV may hard hang on looping batchbuffer
299 * if GEN6_PM_UP_EI_EXPIRED is masked. 299 * if GEN6_PM_UP_EI_EXPIRED is masked.
300 *
301 * TODO: verify if this can be reproduced on VLV,CHV.
300 */ 302 */
301 if (INTEL_INFO(dev_priv)->gen <= 7 && !IS_HASWELL(dev_priv)) 303 if (INTEL_INFO(dev_priv)->gen <= 7 && !IS_HASWELL(dev_priv))
302 mask &= ~GEN6_PM_RP_UP_EI_EXPIRED; 304 mask &= ~GEN6_PM_RP_UP_EI_EXPIRED;
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 3801ff59595f..bf814a64582a 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4432,7 +4432,8 @@ static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
4432 return; 4432 return;
4433 4433
4434 /* Mask turbo interrupt so that they will not come in between */ 4434 /* Mask turbo interrupt so that they will not come in between */
4435 I915_WRITE(GEN6_PMINTRMSK, 0xffffffff); 4435 I915_WRITE(GEN6_PMINTRMSK,
4436 gen6_sanitize_rps_pm_mask(dev_priv, ~0));
4436 4437
4437 vlv_force_gfx_clock(dev_priv, true); 4438 vlv_force_gfx_clock(dev_priv, true);
4438 4439