@@ -1608,7 +1608,7 @@ static int i915_drm_suspend(struct drm_device *dev)
return error;
}
-static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation)
+static int i915_drm_suspend_late(struct drm_device *dev, bool allow_s2idle)
{
struct drm_i915_private *dev_priv = to_i915(dev);
struct pci_dev *pdev = dev_priv->drm.pdev;
@@ -1625,7 +1625,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation)
* also enable deeper system power states that would be blocked if the
* firmware was inactive.
*/
- if (IS_GEN9_LP(dev_priv) || hibernation || !suspend_to_idle(dev_priv) ||
+ if (IS_GEN9_LP(dev_priv) || !allow_s2idle || !suspend_to_idle(dev_priv) ||
dev_priv->csr.dmc_payload == NULL) {
intel_power_domains_suspend(dev_priv);
dev_priv->power_domains_suspended = true;
@@ -1662,7 +1662,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation)
* Fujitsu FSC S7110
* Acer Aspire 1830T
*/
- if (!(hibernation && INTEL_GEN(dev_priv) < 6))
+ if (allow_s2idle || INTEL_GEN(dev_priv) >= 6)
pci_set_power_state(pdev, PCI_D3hot);
out:
@@ -2100,7 +2100,7 @@ static int i915_pm_suspend_late(struct device *kdev)
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
- return i915_drm_suspend_late(dev, false);
+ return i915_drm_suspend_late(dev, true);
}
static int i915_pm_poweroff_late(struct device *kdev)
@@ -2110,7 +2110,7 @@ static int i915_pm_poweroff_late(struct device *kdev)
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
- return i915_drm_suspend_late(dev, true);
+ return i915_drm_suspend_late(dev, false);
}
static int i915_pm_resume_early(struct device *kdev)
@@ -2158,7 +2158,7 @@ static int i915_pm_freeze_late(struct device *kdev)
int ret;
if (dev->switch_power_state != DRM_SWITCH_POWER_OFF) {
- ret = i915_drm_suspend_late(dev, true);
+ ret = i915_drm_suspend_late(dev, false);
if (ret)
return ret;
}