linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Dave Airlie <airlied@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"dri-devel" <dri-devel@lists.freedesktop.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-pci@vger.kernel.org
Subject: Re: runtime PM and special power switches
Date: Wed, 12 Sep 2012 00:23:11 +0200	[thread overview]
Message-ID: <201209120023.11662.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1209111730340.22718-100000@netrider.rowland.org>

On Tuesday, September 11, 2012, Alan Stern wrote:
> On Tue, 11 Sep 2012, Rafael J. Wysocki wrote:
> 
> > Hi,
> > 
> > On Tuesday, September 11, 2012, Dave Airlie wrote:
> > > Hi Rafael,
> > > 
> > > I've been investigating runtime PM support for some use-cases on GPUs.
> > > 
> > > In some laptops we have a secondary GPU (optimus) that can be powered
> > > up for certain 3D tasks and then turned off when finished with. Now I
> > > did an initial pass on supporting it without using the kernel runtime
> > > PM stuff, but Alan said I should take a look so here I am.
> > 
> > Alan Stern or Alan Cox? :-)
> > 
> > > While I've started to get a handle on things, we have a bit of an
> > > extra that I'm not sure we cater for.
> > > 
> > > Currently we get called from the PCI layer which after we are finished
> > > with our runtime suspend callback, will go put the device into the
> > > correct state etc, however on these optimus/powerxpress laptops we
> > > have a separate ACPI or platform driver controlled power switch that
> > > we need to call once the PCI layer is finished the job. This switch
> > > effectively turns the power to the card completely off leaving it
> > > drawing no power.
> > > 
> > > No we can't hit the switch from the driver callback as the PCI layer
> > > will get lost, so I'm wondering how you'd envisage we could plug this
> > > in.
> > 
> > Hmm.  In principle we might modify pci_pm_runtime_suspend() so that it
> > doesn't call pci_finish_runtime_suspend() if pci_dev->state_saved is
> > set.  That would actually make it work in analogy with pci_pm_suspend_noirq(),
> > so perhaps it's not even too dangerous.
> 
> This sounds more like a job for a power domain.  Unless the power
> switch is already in the device hierarchy as a parent to the PCI
> device.

Good idea. :-)

Thanks,
Rafael

  reply	other threads:[~2012-09-11 22:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPM=9tzq2+LO2BzEmmByeozKzX6nswi1EwvEEM_bgo9kFv1hhA@mail.gmail.com>
2012-09-11 20:55 ` runtime PM and special power switches Rafael J. Wysocki
2012-09-11 21:32   ` Alan Stern
2012-09-11 22:23     ` Rafael J. Wysocki [this message]
2012-09-11 22:23     ` Dave Airlie
2012-09-11 22:58       ` Rafael J. Wysocki
2012-09-12  5:13         ` Dave Airlie
2012-09-12  6:09           ` Dave Airlie
2012-09-18 21:47             ` Rafael J. Wysocki

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=201209120023.11662.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=airlied@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).