[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-15 Thread Mika Westerberg
On Tue, Mar 15, 2016 at 02:39:58PM +0100, Lukas Wunner wrote: > Hi Mika, > > On Mon, Mar 14, 2016 at 11:43:35AM +0200, Mika Westerberg wrote: > > On Mon, Mar 14, 2016 at 12:19:14PM +1000, Dave Airlie wrote: > > > On 11 March 2016 at 23:45, Rafael J. Wysocki wrote: > > > > On Friday, March 11,

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-15 Thread Lukas Wunner
Hi Mika, On Mon, Mar 14, 2016 at 11:43:35AM +0200, Mika Westerberg wrote: > On Mon, Mar 14, 2016 at 12:19:14PM +1000, Dave Airlie wrote: > > On 11 March 2016 at 23:45, Rafael J. Wysocki wrote: > > > On Friday, March 11, 2016 12:58:15 PM Mika Westerberg wrote: > > >> On Thu, Mar 10, 2016 at

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-14 Thread Dave Airlie
> >> - if (pcie_port_runtime_suspend_allowed(dev)) >> + if (pcie_port_runtime_suspend_allowed(dev)) { >> + pm_runtime_allow(>dev); > > PCI drivers typically have left this decision up to the userspace. I'm > wondering whether it is good idea to deviate from that here? Of course

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-14 Thread Mika Westerberg
On Mon, Mar 14, 2016 at 01:50:41PM +0100, Rafael J. Wysocki wrote: > On Mon, Mar 14, 2016 at 11:23 AM, Mika Westerberg > wrote: > > On Mon, Mar 14, 2016 at 07:47:39PM +1000, Dave Airlie wrote: > >> > > >> >> - if (pcie_port_runtime_suspend_allowed(dev)) > >> >> + if

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-14 Thread Rafael J. Wysocki
On Mon, Mar 14, 2016 at 11:23 AM, Mika Westerberg wrote: > On Mon, Mar 14, 2016 at 07:47:39PM +1000, Dave Airlie wrote: >> > >> >> - if (pcie_port_runtime_suspend_allowed(dev)) >> >> + if (pcie_port_runtime_suspend_allowed(dev)) { >> >> + pm_runtime_allow(>dev); >> > >> > PCI

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-14 Thread Mika Westerberg
On Mon, Mar 14, 2016 at 07:47:39PM +1000, Dave Airlie wrote: > > > >> - if (pcie_port_runtime_suspend_allowed(dev)) > >> + if (pcie_port_runtime_suspend_allowed(dev)) { > >> + pm_runtime_allow(>dev); > > > > PCI drivers typically have left this decision up to the userspace. I'm

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-14 Thread Dave Airlie
On 11 March 2016 at 23:45, Rafael J. Wysocki wrote: > On Friday, March 11, 2016 12:58:15 PM Mika Westerberg wrote: >> On Thu, Mar 10, 2016 at 09:57:09PM +0100, Rafael J. Wysocki wrote: >> > > It doesn't seem to do any runtime PM, >> > > I do wonder if pcieport should be doing it's own runtime PM

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-14 Thread Mika Westerberg
On Mon, Mar 14, 2016 at 12:19:14PM +1000, Dave Airlie wrote: > On 11 March 2016 at 23:45, Rafael J. Wysocki wrote: > > On Friday, March 11, 2016 12:58:15 PM Mika Westerberg wrote: > >> On Thu, Mar 10, 2016 at 09:57:09PM +0100, Rafael J. Wysocki wrote: > >> > > It doesn't seem to do any runtime

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-14 Thread Daniel Vetter
On Mon, Mar 14, 2016 at 07:47:39PM +1000, Dave Airlie wrote: > > > >> - if (pcie_port_runtime_suspend_allowed(dev)) > >> + if (pcie_port_runtime_suspend_allowed(dev)) { > >> + pm_runtime_allow(>dev); > > > > PCI drivers typically have left this decision up to the userspace. I'm

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-14 Thread Alex Deucher
On Sun, Mar 13, 2016 at 10:19 PM, Dave Airlie wrote: > On 11 March 2016 at 23:45, Rafael J. Wysocki wrote: >> On Friday, March 11, 2016 12:58:15 PM Mika Westerberg wrote: >>> On Thu, Mar 10, 2016 at 09:57:09PM +0100, Rafael J. Wysocki wrote: >>> > > It doesn't seem to do any runtime PM, >>> > >

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-11 Thread Rafael J. Wysocki
On Friday, March 11, 2016 12:58:15 PM Mika Westerberg wrote: > On Thu, Mar 10, 2016 at 09:57:09PM +0100, Rafael J. Wysocki wrote: > > > It doesn't seem to do any runtime PM, > > > I do wonder if pcieport should be doing it's own runtime PM handling, > > > but that is a > > > larger task than I'm

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-11 Thread Mika Westerberg
On Thu, Mar 10, 2016 at 09:57:09PM +0100, Rafael J. Wysocki wrote: > > It doesn't seem to do any runtime PM, > > I do wonder if pcieport should be doing it's own runtime PM handling, > > but that is a > > larger task than I'm thinking to tackle here. > > PCIe ports don't do PM - yet. Mika has

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-10 Thread Rafael J. Wysocki
On Thursday, March 10, 2016 07:56:41 AM Dave Airlie wrote: > On 9 March 2016 at 23:19, Rafael J. Wysocki wrote: > > On Wed, Mar 9, 2016 at 7:14 AM, Dave Airlie wrote: > >> From: Dave Airlie > >> > >> Windows 10 seems to have standardised power control for the > >> optimus/powerxpress laptops

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-10 Thread Dave Airlie
On 10 March 2016 at 06:17, Lukas Wunner 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 wrote: >> > On Wed, Mar 09, 2016 at 04:14:04PM +1000, Dave Airlie wrote: >> >> From: Dave Airlie >> >> >> >> Windows 10 seems to

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-10 Thread Dave Airlie
On 10 March 2016 at 00:33, Lukas Wunner wrote: > Hi Dave, > > On Wed, Mar 09, 2016 at 04:14:04PM +1000, Dave Airlie wrote: >> From: Dave Airlie >> >> Windows 10 seems to have standardised power control for the >> optimus/powerxpress laptops using PR3 power resource hooks. > > What happened to

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-10 Thread Dave Airlie
On 9 March 2016 at 23:19, Rafael J. Wysocki wrote: > On Wed, Mar 9, 2016 at 7:14 AM, Dave Airlie wrote: >> From: Dave Airlie >> >> Windows 10 seems to have standardised power control for the >> optimus/powerxpress laptops using PR3 power resource hooks. >> >> I'm not sure this is definitely the

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-09 Thread Lukas Wunner
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 wrote: > > On Wed, Mar 09, 2016 at 04:14:04PM +1000, Dave Airlie wrote: > >> From: Dave Airlie > >> > >> Windows 10 seems to have standardised power control for the > >>

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-09 Thread Dave Airlie
From: Dave Airlie Windows 10 seems to have standardised power control for the optimus/powerxpress laptops using PR3 power resource hooks. I'm not sure this is definitely the correct place to be doing this, but it works for me here. The ACPI device for the GPU I have is

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-09 Thread Lukas Wunner
Hi Dave, On Wed, Mar 09, 2016 at 04:14:04PM +1000, Dave Airlie wrote: > From: Dave Airlie > > 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

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-09 Thread Alex Deucher
On Wed, Mar 9, 2016 at 3:17 PM, Lukas Wunner 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 wrote: >> > On Wed, Mar 09, 2016 at 04:14:04PM +1000, Dave Airlie wrote: >> >> From: Dave Airlie >> >> >> >> Windows 10

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-09 Thread Rafael J. Wysocki
On Wed, Mar 9, 2016 at 7:14 AM, Dave Airlie wrote: > From: Dave Airlie > > Windows 10 seems to have standardised power control for the > optimus/powerxpress laptops using PR3 power resource hooks. > > I'm not sure this is definitely the correct place to be > doing this, but it works for me here.

[PATCH 1/2] vga_switcheroo: add power support for windows 10 machines.

2016-03-09 Thread Alex Deucher
On Wed, Mar 9, 2016 at 9:33 AM, Lukas Wunner wrote: > Hi Dave, > > On Wed, Mar 09, 2016 at 04:14:04PM +1000, Dave Airlie wrote: >> From: Dave Airlie >> >> Windows 10 seems to have standardised power control for the >> optimus/powerxpress laptops using PR3 power resource hooks. > > What happened