@@ -520,6 +520,8 @@ static int i915_drm_freeze(struct drm_device *dev)
return error;
}
+ intel_cancel_rps_resume_work(dev_priv);
+
intel_runtime_pm_disable_interrupts(dev);
dev_priv->enable_hotplug_processing = false;
@@ -993,6 +993,7 @@ void intel_enable_gt_powersave(struct drm_device *dev);
void intel_disable_gt_powersave(struct drm_device *dev);
void intel_suspend_gt_powersave(struct drm_device *dev);
void intel_reset_gt_powersave(struct drm_device *dev);
+void intel_cancel_rps_resume_work(struct drm_i915_private *dev_priv);
void ironlake_teardown_rc6(struct drm_device *dev);
void gen6_update_ring_freq(struct drm_device *dev);
void gen6_rps_idle(struct drm_i915_private *dev_priv);
@@ -4911,6 +4911,14 @@ void intel_disable_gt_powersave(struct drm_device *dev)
}
}
+/* This function needs to put/clear any resources that the
+ * rps.delayed_resume_work function puts/clears. */
+void intel_cancel_rps_resume_work(struct drm_i915_private *dev_priv)
+{
+ if (cancel_delayed_work_sync(&dev_priv->rps.delayed_resume_work))
+ intel_runtime_pm_put(dev_priv);
+}
+
static void intel_gen6_powersave_work(struct work_struct *work)
{
struct drm_i915_private *dev_priv =