[Intel-gfx] [PATCH 16/16] drm/i915: add comments on what stage a given PM handler is called
Ville Syrjälä
ville.syrjala at linux.intel.com
Tue Oct 21 15:42:02 CEST 2014
On Wed, Sep 10, 2014 at 06:17:09PM +0300, Imre Deak wrote:
> This will hopefully make it easier to navigate the code without the need
> to consult the full PM documentation.
>
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 55b04e6..44c9317 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1506,10 +1506,21 @@ static int intel_resume_prepare(struct drm_i915_private *dev_priv,
> }
>
> static const struct dev_pm_ops i915_pm_ops = {
> + /* S0ix, S3 event handlers */
Well, S0ix can occur in due to runtime PM as well.
> .suspend = i915_pm_suspend,
> .suspend_late = i915_pm_suspend_late,
> .resume_early = i915_pm_resume_early,
> .resume = i915_pm_resume,
> +
> + /*
> + * S4 event handlers
> + * @freeze, @freeze_late : called before creating hibernation image
That's FREEZE. Also called before restoring the hibenation image (QUIESCE).
> + * @thaw, @thaw_early : called after creating hibernation image,
> + * before writing it
That's THAW. Also called after failing the snapshot or restore (RECOVER).
> + * @poweroff, @poweroff_late: called after writing hibernation image,
> + * before rebooting
> + * @restore, @restore_early : called after rebooting
"after restoring the hibernation image" is what I'd say. That's RESTORE.
> + */
> .freeze = i915_pm_suspend,
> .freeze_late = i915_pm_suspend_late,
> .thaw_early = i915_pm_resume_early,
> @@ -1518,6 +1529,8 @@ static const struct dev_pm_ops i915_pm_ops = {
> .poweroff_late = i915_pm_suspend_late,
> .restore_early = i915_pm_resume_early,
> .restore = i915_pm_resume,
> +
> + /* D0<->D3 (runtime PM) event handlers */
> .runtime_suspend = intel_runtime_suspend,
> .runtime_resume = intel_runtime_resume,
> };
> --
> 1.8.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list