drm/i915: Add distinct stubs for PM hibernation phases
Currently for handling the extra hibernation phases we just call the equivalent suspend/resume phases. In the next couple of patches, I wish to specialise the hibernation phases to reduce the amount of work required for handling GEM objects. v2: There are more! Don't forget the freeze phases. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Imre Deak <imre.deak@intel.com> Cc: David Weinehall <david.weinehall@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463207195-22076-1-git-send-email-chris@chris-wilson.co.uk
This commit is contained in:
@@ -1115,6 +1115,39 @@ static int i915_pm_resume(struct device *dev)
|
|||||||
return i915_drm_resume(drm_dev);
|
return i915_drm_resume(drm_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* freeze: before creating the hibernation_image */
|
||||||
|
static int i915_pm_freeze(struct device *dev)
|
||||||
|
{
|
||||||
|
return i915_pm_suspend(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int i915_pm_freeze_late(struct device *dev)
|
||||||
|
{
|
||||||
|
return i915_pm_suspend_late(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* thaw: called after creating the hibernation image, but before turning off. */
|
||||||
|
static int i915_pm_thaw_early(struct device *dev)
|
||||||
|
{
|
||||||
|
return i915_pm_resume_early(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int i915_pm_thaw(struct device *dev)
|
||||||
|
{
|
||||||
|
return i915_pm_resume(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* restore: called after loading the hibernation image. */
|
||||||
|
static int i915_pm_restore_early(struct device *dev)
|
||||||
|
{
|
||||||
|
return i915_pm_resume_early(dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int i915_pm_restore(struct device *dev)
|
||||||
|
{
|
||||||
|
return i915_pm_resume(dev);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Save all Gunit registers that may be lost after a D3 and a subsequent
|
* Save all Gunit registers that may be lost after a D3 and a subsequent
|
||||||
* S0i[R123] transition. The list of registers needing a save/restore is
|
* S0i[R123] transition. The list of registers needing a save/restore is
|
||||||
@@ -1669,14 +1702,14 @@ static const struct dev_pm_ops i915_pm_ops = {
|
|||||||
* @restore, @restore_early : called after rebooting and restoring the
|
* @restore, @restore_early : called after rebooting and restoring the
|
||||||
* hibernation image [PMSG_RESTORE]
|
* hibernation image [PMSG_RESTORE]
|
||||||
*/
|
*/
|
||||||
.freeze = i915_pm_suspend,
|
.freeze = i915_pm_freeze,
|
||||||
.freeze_late = i915_pm_suspend_late,
|
.freeze_late = i915_pm_freeze_late,
|
||||||
.thaw_early = i915_pm_resume_early,
|
.thaw_early = i915_pm_thaw_early,
|
||||||
.thaw = i915_pm_resume,
|
.thaw = i915_pm_thaw,
|
||||||
.poweroff = i915_pm_suspend,
|
.poweroff = i915_pm_suspend,
|
||||||
.poweroff_late = i915_pm_poweroff_late,
|
.poweroff_late = i915_pm_poweroff_late,
|
||||||
.restore_early = i915_pm_resume_early,
|
.restore_early = i915_pm_restore_early,
|
||||||
.restore = i915_pm_resume,
|
.restore = i915_pm_restore,
|
||||||
|
|
||||||
/* S0ix (via runtime suspend) event handlers */
|
/* S0ix (via runtime suspend) event handlers */
|
||||||
.runtime_suspend = intel_runtime_suspend,
|
.runtime_suspend = intel_runtime_suspend,
|
||||||
|
|||||||
Reference in New Issue
Block a user