Re: [PATCH 16/16] drm/i915: add comments on what stage a given PM handler is called

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-10-21 at 16:42 +0300, Ville Syrjälä wrote:
> 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@xxxxxxxxx>
> > ---
> >  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.

Ok, I'll add a note about this. 

> 
> >  	.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).

Yes, I noticed this and sent a v2 with that added.

> 
> > +	 * @thaw, @thaw_early       : called after creating hibernation image,
> > +	 *                            before writing it
> 
> That's THAW. Also called after failing the snapshot or restore (RECOVER).

Ok, will add this.

> 
> > +	 * @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.

This is also clarified in v2.

> 
> > +	 */
> >  	.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@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 


_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux