drm/i915: Check that we disable RPS interrupts prior to suspending

Submitted by Chris Wilson on Aug. 21, 2017, 9:58 a.m.

Details

Message ID 20170821095853.1095-1-chris@chris-wilson.co.uk
State New
Headers show
Series "drm/i915: Check that we disable RPS interrupts prior to suspending" ( rev: 1 ) in Intel GFX - Try Bot

Browsing this patch as part of:
"drm/i915: Check that we disable RPS interrupts prior to suspending" rev 1 in Intel GFX - Try Bot
<< prev patch [1/1] next patch >>

Commit Message

Chris Wilson Aug. 21, 2017, 9:58 a.m.
Anytime we suspend, either at runtime or S3, check that we have disabled
the RPS interrupt generator (via PMINTRMSK). This should have been done
upon idling (see gen6_rps_idle()) prior to dropping our GT wakeref.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 68187bcfded4..8f66587a45de 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -7796,13 +7796,16 @@  void intel_cleanup_gt_powersave(struct drm_i915_private *dev_priv)
  */
 void intel_suspend_gt_powersave(struct drm_i915_private *dev_priv)
 {
+	GEM_BUG_ON(dev_priv->gt.awake);
+
 	if (INTEL_GEN(dev_priv) < 6)
 		return;
 
 	if (cancel_delayed_work_sync(&dev_priv->rps.autoenable_work))
 		intel_runtime_pm_put(dev_priv);
 
-	/* gen6_rps_idle() will be called later to disable interrupts */
+	GEM_WARN_ON(I915_READ(GEN6_PMINTRMSK) !=
+		    gen6_sanitize_rps_pm_mask(dev_priv, ~0));
 }
 
 void intel_sanitize_gt_powersave(struct drm_i915_private *dev_priv)