Commit 163f53a2 authored by Imre Deak's avatar Imre Deak Committed by Daniel Vetter

drm/i915: vlv: fix gunit HW state corruption during S4 suspend

During S4 freeze we don't call intel_suspend_complete(), which would
save the gunit HW state, but during S4 thaw/restore events we call
intel_resume_prepare() which restores it, thus ending up in a corrupted
HW state.

Fix this by calling intel_suspend_complete() from the corresponding
freeze_late event handler.

The issue was introduced in
commit 016970be
Author: Sagar Kamble <sagar.a.kamble@intel.com>
Date:   Wed Aug 13 23:07:06 2014 +0530

CC: Sagar Kamble <sagar.a.kamble@intel.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 2fa60f6d
...@@ -1011,6 +1011,15 @@ static int i915_pm_freeze(struct device *dev) ...@@ -1011,6 +1011,15 @@ static int i915_pm_freeze(struct device *dev)
return i915_drm_freeze(drm_dev); return i915_drm_freeze(drm_dev);
} }
static int i915_pm_freeze_late(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
struct drm_i915_private *dev_priv = drm_dev->dev_private;
return intel_suspend_complete(dev_priv);
}
static int i915_pm_thaw_early(struct device *dev) static int i915_pm_thaw_early(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
...@@ -1595,6 +1604,7 @@ static const struct dev_pm_ops i915_pm_ops = { ...@@ -1595,6 +1604,7 @@ static const struct dev_pm_ops i915_pm_ops = {
.resume_early = i915_pm_resume_early, .resume_early = i915_pm_resume_early,
.resume = i915_pm_resume, .resume = i915_pm_resume,
.freeze = i915_pm_freeze, .freeze = i915_pm_freeze,
.freeze_late = i915_pm_freeze_late,
.thaw_early = i915_pm_thaw_early, .thaw_early = i915_pm_thaw_early,
.thaw = i915_pm_thaw, .thaw = i915_pm_thaw,
.poweroff = i915_pm_poweroff, .poweroff = i915_pm_poweroff,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment