public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: David Weinehall <david.weinehall@intel.com>
Subject: Re: [PATCH v2 1/4] drm/i915: Add distinct stubs for PM hibernation phases
Date: Fri, 13 May 2016 10:39:24 +0300	[thread overview]
Message-ID: <1463125164.5008.2.camel@linux.intel.com> (raw)
In-Reply-To: <1463063296-7722-1-git-send-email-chris@chris-wilson.co.uk>

On to, 2016-05-12 at 15:28 +0100, Chris Wilson wrote:
> 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>

> ---
>  drivers/gpu/drm/i915/i915_drv.c | 45 +++++++++++++++++++++++++++++++++++------
>  1 file changed, 39 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 5ae79601335c..6a2e7f84276b 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1115,6 +1115,39 @@ static int i915_pm_resume(struct device *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
>   * 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
>  	 *                            hibernation image [PMSG_RESTORE]
>  	 */
> -	.freeze = i915_pm_suspend,
> -	.freeze_late = i915_pm_suspend_late,
> -	.thaw_early = i915_pm_resume_early,
> -	.thaw = i915_pm_resume,
> +	.freeze = i915_pm_freeze,
> +	.freeze_late = i915_pm_freeze_late,
> +	.thaw_early = i915_pm_thaw_early,
> +	.thaw = i915_pm_thaw,
>  	.poweroff = i915_pm_suspend,
>  	.poweroff_late = i915_pm_poweroff_late,
> -	.restore_early = i915_pm_resume_early,
> -	.restore = i915_pm_resume,
> +	.restore_early = i915_pm_restore_early,
> +	.restore = i915_pm_restore,
>  
>  	/* S0ix (via runtime suspend) event handlers */
>  	.runtime_suspend = intel_runtime_suspend,
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-05-13  7:37 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 11:41 Speed up resume by focused clflushing Chris Wilson
2016-05-12 11:41 ` [PATCH 1/4] drm/i915: Add distinct stubs for PM hibernation phases Chris Wilson
2016-05-12 11:52   ` Imre Deak
2016-05-12 12:01     ` Chris Wilson
2016-05-12 11:41 ` [PATCH 2/4] drm/i915: Update domain tracking for GEM objects on hibernation Chris Wilson
2016-05-12 11:41 ` [PATCH 3/4] drm/i915: Lazily migrate the objects after hibernation Chris Wilson
2016-05-12 11:41 ` [PATCH 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems Chris Wilson
2016-05-12 12:27 ` ✓ Ro.CI.BAT: success for series starting with [1/4] drm/i915: Add distinct stubs for PM hibernation phases Patchwork
2016-05-12 12:37   ` Chris Wilson
2016-05-12 14:28 ` [PATCH v2 1/4] " Chris Wilson
2016-05-12 14:28   ` [PATCH v2 2/4] drm/i915: Update domain tracking for GEM objects on hibernation Chris Wilson
2016-05-13  7:40     ` Joonas Lahtinen
2016-05-12 14:28   ` [PATCH v2 3/4] drm/i915: Lazily migrate the objects after hibernation Chris Wilson
2016-05-13  7:46     ` Joonas Lahtinen
2016-05-13 13:17     ` David Weinehall
2016-05-12 14:28   ` [PATCH v2 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems Chris Wilson
2016-05-13  7:46     ` Joonas Lahtinen
2016-05-13 13:17     ` David Weinehall
2016-05-13  7:39   ` Joonas Lahtinen [this message]
2016-05-13 14:30 ` [CI 1/4] drm/i915: Add distinct stubs for PM hibernation phases Chris Wilson
2016-05-13 14:30   ` [CI 2/4] drm/i915: Update domain tracking for GEM objects on hibernation Chris Wilson
2016-05-13 14:30   ` [CI 3/4] drm/i915: Lazily migrate the objects after hibernation Chris Wilson
2016-05-13 14:30   ` [CI 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems Chris Wilson
2016-05-13 16:10 ` ✗ Ro.CI.BAT: failure for series starting with [1/4] drm/i915: Add distinct stubs for PM hibernation phases (rev4) Patchwork
2016-05-13 17:52 ` [CI 1/4] drm/i915: Add distinct stubs for PM hibernation phases Chris Wilson
2016-05-13 17:52   ` [CI 2/4] drm/i915: Update domain tracking for GEM objects on hibernation Chris Wilson
2016-05-13 17:52   ` [CI 3/4] drm/i915: Lazily migrate the objects after hibernation Chris Wilson
2016-05-13 17:52   ` [CI 4/4] drm/i915: Skip clearing the GGTT on full-ppgtt systems Chris Wilson
2016-05-13 19:30 ` ✗ Ro.CI.BAT: failure for series starting with [1/4] drm/i915: Add distinct stubs for PM hibernation phases (rev7) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463125164.5008.2.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=david.weinehall@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox