History

drm/i915: disable rps irqs earlier during suspend/unload

After the previous patch RPS disabling doesn't depend any more on the first level interrupts being disabled, so we can move it everywhere earlier. Doing so let's us think about the uninitialization steps afterwards independently of any asynchronous RPS events that can happen atm. It also makes the system/runtime suspend time RPS disabling more uniform. Finally this gets rid of the WARN in intel_suspend_gt_powersave(), which we can hit if a final RPS work runs after we disabled the first level interrupts.

Imre Deak committed 11 years ago

Commit 2eb52521 parent d4d70aa3 files · +6 −12Browse files

Unified · Split

3 files
  1. drivers/gpu/drm/i915/i915_drv.c +3 −6
  2. drivers/gpu/drm/i915/intel_display.c +3 −3
  3. drivers/gpu/drm/i915/intel_pm.c +0 −3
drivers/gpu/drm/i915/i915_drv.c+3−6
@@ -584,6 +584,8 @@ static int i915_drm_suspend(struct drm_device *dev) · 583 unmodified lines
584584 return error;
585585 }
586586
587+ intel_suspend_gt_powersave(dev);
588+
587589 /*
588590 * Disable CRTCs directly since we want to preserve sw state
589591 * for _thaw. Also, power gate the CRTC power wells.
@@ -595,15 +597,11 @@ static int i915_drm_suspend(struct drm_device *dev) · 5 unmodified lines
595597
596598 intel_dp_mst_suspend(dev);
597599
598− flush_delayed_work(&dev_priv->rps.delayed_resume_work);
599−
600600 intel_runtime_pm_disable_interrupts(dev_priv);
601601 intel_hpd_cancel_work(dev_priv);
602602
603603 intel_suspend_encoders(dev_priv);
604604
605− intel_suspend_gt_powersave(dev);
606−
607605 intel_suspend_hw(dev);
608606 }
609607
@@ -1393,9 +1391,8 @@ static int intel_runtime_suspend(struct device *device) · 783 unmodified lines
13931391 i915_gem_release_all_mmaps(dev_priv);
13941392 mutex_unlock(&dev->struct_mutex);
13951393
1396− flush_delayed_work(&dev_priv->rps.delayed_resume_work);
1397− intel_runtime_pm_disable_interrupts(dev_priv);
13981394 intel_suspend_gt_powersave(dev);
1395+ intel_runtime_pm_disable_interrupts(dev_priv);
13991396
14001397 ret = intel_suspend_complete(dev_priv);
14011398 if (ret) {
drivers/gpu/drm/i915/intel_display.c+3−3
@@ -13540,11 +13540,13 @@ void intel_modeset_cleanup(struct drm_device *dev) · 13539 unmodified lines
1354013540 struct drm_i915_private *dev_priv = dev->dev_private;
1354113541 struct drm_connector *connector;
1354213542
13543+ intel_disable_gt_powersave(dev);
13544+
1354313545 intel_backlight_unregister(dev);
1354413546
1354513547 /*
1354613548 * Interrupts and polling as the first thing to avoid creating havoc.
13547− * Too much stuff here (turning of rps, connectors, ...) would
13549+ * Too much stuff here (turning of connectors, ...) would
1354813550 * experience fancy races otherwise.
1354913551 */
1355013552 intel_irq_uninstall(dev_priv);
@@ -13561,8 +13563,6 @@ void intel_modeset_cleanup(struct drm_device *dev) · 10 unmodified lines
1356113563
1356213564 intel_disable_fbc(dev);
1356313565
13564− intel_disable_gt_powersave(dev);
13565−
1356613566 ironlake_teardown_rc6(dev);
1356713567
1356813568 mutex_unlock(&dev->struct_mutex);
drivers/gpu/drm/i915/intel_pm.c+0−3
@@ -6183,9 +6183,6 @@ void intel_suspend_gt_powersave(struct drm_device *dev) · 6182 unmodified lines
61836183 {
61846184 struct drm_i915_private *dev_priv = dev->dev_private;
61856185
6186− /* Interrupts should be disabled already to avoid re-arming. */
6187− WARN_ON(intel_irqs_enabled(dev_priv));
6188−
61896186 if (INTEL_INFO(dev)->gen < 6)
61906187 return;
61916188

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t