linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: Alex Deucher <alexdeucher@gmail.com>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>,
	Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.
Date: Thu, 10 Mar 2016 08:02:13 +1000	[thread overview]
Message-ID: <CAPM=9txqnnL9UtjYD22BG2QTXdBndJBP_VRmC-=bDkWb7ddRoQ@mail.gmail.com> (raw)
In-Reply-To: <20160309201750.GA26222@wunner.de>

On 10 March 2016 at 06:17, Lukas Wunner <lukas@wunner.de> wrote:
> Hi,
>
> On Wed, Mar 09, 2016 at 11:52:33AM -0500, Alex Deucher wrote:
>> On Wed, Mar 9, 2016 at 9:33 AM, Lukas Wunner <lukas@wunner.de> wrote:
>> > On Wed, Mar 09, 2016 at 04:14:04PM +1000, Dave Airlie wrote:
>> >> From: Dave Airlie <airlied@redhat.com>
>> >>
>> >> Windows 10 seems to have standardised power control for the
>> >> optimus/powerxpress laptops using PR3 power resource hooks.
>> >
>> > What happened to the Optimus DSM, does this still work? If not,
>> > echoing OFF to the vgaswitcheroo sysfs file won't power down the
>> > GPU now, right? (If runtime pm is disabled in nouveau.)
>> >
>> If the OS identifies itself as windows 10 or newer when initializing
>> ACPI, the standardized interfaces should be used if they exist.  I'm
>> not sure if there is any explicit policy on the vendor specific ones,
>> but I suspect they are probably broken in that case since I doubt the
>> OEM validates them when the standardized interfaces are available.
>
> The vendor interface (Optimus DSM) must be present, otherwise the call
> to nouveau_is_optimus() in patch [2/2] would return false.
>
> But indeed it seems to not be working, otherwise why would the patches
> be necessary?
>
> My point is that the chosen approach does not square with vga_switcheroo's
> architecture: Normally it's the handler's job to power the GPU up/down.
> If runtime pm is enabled then vga_switcheroo_init_domain_pm_ops()
> activates runtime_suspend/_resume callbacks which ask the handler to
> flip the power switch.
>
> However these two patches add *additional* runtime_suspend/_resume
> callbacks which do not rely on the handler at all. The handler is thus
> useless. This becomes apparent when loading the nouveau module with
> runpm=0: Normally the user is then able to manually power the GPU
> up/down by echoing ON or OFF to the vgaswitcheroo sysfs file. With the
> chosen approach this will likely not work because the handler only knows
> how to invoke the DSM, it doesn't know anything about PR3.
>
> Hence my suggestion to solve this with an additional handler which
> gets used in lieu of the nouveau DSM handler.

I'll think about this a bit more, but really I don't care for vgaswitcheroo
manual power control anymore. It's in debugfs for a reason, it was a stopgap
until we got dynamic power control.

If dynamic power control isn't working for some people we should fix that,
but supporting nouveau.runpm=0 and manual power control is so far down
the list of things I care about.

Dave.

  parent reply	other threads:[~2016-03-09 22:02 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09  6:14 [PATCH 1/2] vga_switcheroo: add power support for windows 10 machines Dave Airlie
2016-03-09  6:14 ` [PATCH 2/2] nouveau: use new vga_switcheroo power domain Dave Airlie
2016-03-09 13:20   ` Rafael J. Wysocki
2016-03-09 14:40   ` Lukas Wunner
2016-03-09 22:04     ` Dave Airlie
2016-03-15 20:47       ` Lukas Wunner
2016-03-09 13:19 ` [PATCH 1/2] vga_switcheroo: add power support for windows 10 machines Rafael J. Wysocki
2016-03-09 21:56   ` Dave Airlie
2016-03-10 20:57     ` Rafael J. Wysocki
2016-03-11 10:58       ` Mika Westerberg
2016-03-11 13:45         ` Rafael J. Wysocki
2016-03-14  2:19           ` Dave Airlie
2016-03-14  9:43             ` Mika Westerberg
2016-03-14  9:47               ` Dave Airlie
2016-03-14 10:02                 ` Daniel Vetter
2016-03-14 10:23                 ` Mika Westerberg
2016-03-14 12:50                   ` Rafael J. Wysocki
2016-03-14 14:30                     ` Mika Westerberg
2016-03-15 13:39               ` Lukas Wunner
2016-03-15 13:57                 ` Mika Westerberg
2016-03-14 14:30             ` Alex Deucher
2016-03-09 14:33 ` Lukas Wunner
2016-03-09 16:52   ` Alex Deucher
2016-03-09 20:17     ` Lukas Wunner
2016-03-09 20:22       ` Alex Deucher
2016-03-09 22:02       ` Dave Airlie [this message]
2016-03-09 22:00   ` Dave Airlie

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='CAPM=9txqnnL9UtjYD22BG2QTXdBndJBP_VRmC-=bDkWb7ddRoQ@mail.gmail.com' \
    --to=airlied@gmail.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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).