From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Todd Brandt <todd.e.brandt@linux.intel.com>
Cc: todd.e.brandt@intel.com, intel-gfx@lists.freedesktop.org,
rodrigo.vivi@intel.com
Subject: Re: [PATCH] i915 suspend/resume_noirq instead of suspend_late/resume_early
Date: Wed, 27 Apr 2016 22:31:56 +0300 [thread overview]
Message-ID: <20160427193155.GU4329@intel.com> (raw)
In-Reply-To: <1461782782-10004-1-git-send-email-todd.e.brandt@linux.intel.com>
On Wed, Apr 27, 2016 at 11:46:22AM -0700, Todd Brandt wrote:
> I'd like to propose that we push the i915 suspend_late/resume_early code
> into suspend_noirq/resume_noirq in order to reduce the total suspend time
> by ~15ms. According to the comments, when i915_pm_suspend_late was first
> added to the kernel back in April 2014, it was done so to ensure that it
> was called after the snd_hda_intel driver had finished its suspend.
>
> The comments in i915_drv.c are here:
>
> /*
> * We have a suspedn ordering issue with the snd-hda driver also
> * requiring our device to be power up. Due to the lack of a
> * parent/child relationship we currently solve this with an late
> * suspend hook.
> *
> * FIXME: This should be solved with a special hdmi sink device or
> * similar so that power domains can be employed.
> */
>
> I believe we could achieve the same ordering by simply pushing it to
> suspend/resume_noirq. Thus we can effectively eliminate the suspend_late
> and resume_early phases altogether in most simple systems. Does anyone see
> a problem with this?
>
> analyzesuspend outputs for freeze/suspend/hibernate (WITHOUT PATCH):
> https://01org.github.io/suspendresume/i915/freeze-160422-155931-ivybridge-dev-late/
> https://01org.github.io/suspendresume/i915/suspend-160422-155735-ivybridge-dev-late/
> https://01org.github.io/suspendresume/i915/hibernate-160422-163915-ivybridge-dev-late/
>
> analyzesuspend outputs for freeze/suspend/hibernate (WITH PATCH):
> https://01org.github.io/suspendresume/i915/freeze-160422-162811-ivybridge-dev-noirq/
> https://01org.github.io/suspendresume/i915/suspend-160422-162700-ivybridge-dev-noirq/
> https://01org.github.io/suspendresume/i915/hibernate-160422-162952-ivybridge-dev-noirq/
Hmm. Looking at those makes me confused. Why isn't the pci bus
.resume_noirq hook (pci_pm_resume_noirq()) waking up our pci device?
Instead our wakeup gets delayed until .resume_early for some reason.
>
> Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 30798cb..759d93c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1628,8 +1628,8 @@ static const struct dev_pm_ops i915_pm_ops = {
> * PMSG_RESUME]
> */
> .suspend = i915_pm_suspend,
> - .suspend_late = i915_pm_suspend_late,
> - .resume_early = i915_pm_resume_early,
> + .suspend_noirq = i915_pm_suspend_late,
> + .resume_noirq = i915_pm_resume_early,
> .resume = i915_pm_resume,
>
> /*
> @@ -1648,12 +1648,12 @@ static const struct dev_pm_ops i915_pm_ops = {
> * hibernation image [PMSG_RESTORE]
> */
> .freeze = i915_pm_suspend,
> - .freeze_late = i915_pm_suspend_late,
> - .thaw_early = i915_pm_resume_early,
> + .freeze_noirq = i915_pm_suspend_late,
> + .thaw_noirq = i915_pm_resume_early,
> .thaw = i915_pm_resume,
> .poweroff = i915_pm_suspend,
> - .poweroff_late = i915_pm_poweroff_late,
> - .restore_early = i915_pm_resume_early,
> + .poweroff_noirq = i915_pm_poweroff_late,
> + .restore_noirq = i915_pm_resume_early,
> .restore = i915_pm_resume,
>
> /* S0ix (via runtime suspend) event handlers */
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-27 20:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-27 18:46 [PATCH] i915 suspend/resume_noirq instead of suspend_late/resume_early Todd Brandt
2016-04-27 19:31 ` Ville Syrjälä [this message]
2016-04-27 20:17 ` Todd Brandt
2016-04-27 20:49 ` Ville Syrjälä
2016-04-27 21:27 ` Todd Brandt
2016-04-27 20:33 ` Lukas Wunner
2016-04-27 20:49 ` Todd Brandt
2016-04-27 20:51 ` Todd Brandt
2016-04-27 21:36 ` Imre Deak
2016-04-28 8:32 ` Daniel Vetter
2016-04-28 6:46 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-04-29 9:38 ` [PATCH] " Ville Syrjälä
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=20160427193155.GU4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=todd.e.brandt@intel.com \
--cc=todd.e.brandt@linux.intel.com \
/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