[PATCH v2 2/7] PCI: Make pci_wakeup_bus() & pci_bus_set_current_state() public

2018-03-03 Thread Lukas Wunner
. To this end make pci_wakeup_bus() & pci_bus_set_current_state() public so PCI drivers don't have to reinvent the wheel. Cc: Rafael J. Wysocki Acked-by: Bjorn Helgaas Signed-off-by: Lukas Wunner --- drivers/pci/pci.c | 8 include/linux/pci.h | 2 ++ 2 files changed, 6 inserti

[PATCH v2 3/7] vga_switcheroo: Update PCI current_state on power change

2018-03-03 Thread Lukas Wunner
Cc: Takashi Iwai Cc: Peter Wu Cc: Alex Deucher Cc: Bjorn Helgaas Cc: Rafael J. Wysocki Tested-by: Mike Lothian Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/v

[PATCH v2 5/7] vga_switcheroo: Use device link for HDA controller

2018-03-03 Thread Lukas Wunner
Cc: Dave Airlie Cc: Ben Skeggs Cc: Peter Wu Cc: Alex Deucher Cc: Rafael J. Wysocki Acked-by: Bjorn Helgaas Reviewed-by: Takashi Iwai Tested-by: Mike Lothian Signed-off-by: Lukas Wunner --- Changes since v1: - Drop an unnecessary initialization. (Bjorn) Rephrase error message on fai

[PATCH v2 4/7] vga_switcheroo: Deduplicate power state tracking

2018-03-03 Thread Lukas Wunner
Peter Wu Cc: Alex Deucher Cc: Rafael J. Wysocki Tested-by: Mike Lothian Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 35 +++ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers

[PATCH v2 6/7] vga_switcheroo: Let HDA autosuspend on mux change

2018-03-03 Thread Lukas Wunner
nd or autoresume as it sees fit. Cc: Dave Airlie Cc: Ben Skeggs Cc: Takashi Iwai Cc: Peter Wu Cc: Alex Deucher Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gp

[PATCH v2 7/7] drm/nouveau: Runtime suspend despite HDA being unbound

2018-03-03 Thread Lukas Wunner
the GPU is runtime resumed while the HDA controller is probed, rendering this safety measure obsolete. Remove it. Cc: Dave Airlie Cc: Ben Skeggs Cc: Takashi Iwai Cc: Peter Wu Cc: Alex Deucher Cc: Rafael J. Wysocki Signed-off-by: Lukas Wunner --- drivers/gpu/drm/nouveau/nouveau_

Re: vga_switcheroo: MIS-using the DIS command on a muxless system

2018-01-19 Thread Lukas Wunner
On Fri, Jan 19, 2018 at 08:38:20AM +0100, Enrico Mioso wrote: > I forgot one last question. Is there any way I can force the system > to switch to the ATI card without installing a graphical environment, > just out of curiosity? As you've observed correctly, your particular machine isn't capable o

[PATCH 3/5] drm/nouveau: Fix deadlock on runtime suspend

2018-02-11 Thread Lukas Wunner
ut poll worker Cc: Ben Skeggs Cc: Dave Airlie Signed-off-by: Lukas Wunner --- drivers/gpu/drm/nouveau/nouveau_connector.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_conne

[PATCH 4/5] drm/radeon: Fix deadlock on runtime suspend

2018-02-11 Thread Lukas Wunner
...@vger.kernel.org # v3.13+: 1234567890ab: workqueue: Allow retrieval of current task's work struct Cc: sta...@vger.kernel.org # v3.13+: 1234567890ab: drm: Allow determining if current task is output poll worker Cc: Ismo Toijala Cc: Alex Deucher Cc: Dave Airlie Signed-off-by: Lukas Wunner

[PATCH 1/5] workqueue: Allow retrieval of current task's work struct

2018-02-11 Thread Lukas Wunner
Signed-off-by: Lukas Wunner --- include/linux/workqueue.h | 1 + kernel/workqueue.c| 16 2 files changed, 17 insertions(+) diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 4a54ef96aff5..bc0cda180c8b 100644 --- a/include/linux/workqueue.h +++ b/

[PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers

2018-02-11 Thread Lukas Wunner
allbacks, which seems questionable. msm however does and would also deadlock if it disabled the poll worker on runtime suspend. cc += Archit, Liviu, intel-gfx) Please review. Thanks, Lukas Lukas Wunner (5): workqueue: Allow retrieval of current task's work struct drm: Allow determi

[PATCH 2/5] drm: Allow determining if current task is output poll worker

2018-02-11 Thread Lukas Wunner
ts for runtime suspend to finish. The ->detect callback is invoked from multiple call sites and waiting for runtime suspend to finish is the correct thing to do except if it's executing in the context of the worker. Cc: Dave Airlie Cc: Ben Skeggs Cc: Alex Deucher Signed-off-by

[PATCH 5/5] drm/amdgpu: Fix deadlock on runtime suspend

2018-02-11 Thread Lukas Wunner
drm/amdgpu: add core driver (v4)") Cc: sta...@vger.kernel.org # v4.2+: 1234567890ab: workqueue: Allow retrieval of current task's work struct Cc: sta...@vger.kernel.org # v4.2+: 1234567890ab: drm: Allow determining if current task is output poll worker Cc: Alex Deucher Signed-off-by

Re: [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers

2018-02-11 Thread Lukas Wunner
On Sun, Feb 11, 2018 at 06:58:11PM +, Mike Lothian wrote: > On 11 February 2018 at 09:38, Lukas Wunner wrote: > > The patches for radeon and amdgpu are compile-tested only, I only have a > > MacBook Pro with an Nvidia GK107 to test. To test the patches, add an > > &quo

Re: [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers

2018-02-11 Thread Lukas Wunner
On Sun, Feb 11, 2018 at 08:23:14PM +0100, Lukas Wunner wrote: > On Sun, Feb 11, 2018 at 06:58:11PM +, Mike Lothian wrote: > > On 11 February 2018 at 09:38, Lukas Wunner wrote: > > > The patches for radeon and amdgpu are compile-tested only, I only have a > > > MacBo

Re: [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers

2018-02-11 Thread Lukas Wunner
On Mon, Feb 12, 2018 at 12:35:51AM +, Mike Lothian wrote: > I've not been able to reproduce the original problem you're trying to > solve on amdgpu thats with or without your patch set and the above > "trigger" too > > Is anything else required to trigger it, I started multiple DRI_PRIME > glx

Re: [PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers

2018-02-12 Thread Lukas Wunner
On Mon, Feb 12, 2018 at 09:03:26AM +, Mike Lothian wrote: > On 12 February 2018 at 03:39, Lukas Wunner wrote: > > On Mon, Feb 12, 2018 at 12:35:51AM +, Mike Lothian wrote: > > > I've not been able to reproduce the original problem you're trying to > &g

Re: iMac 10,1 with Ubuntu 16.04: black screen after suspend

2017-07-17 Thread Lukas Wunner
On Fri, Jun 02, 2017 at 06:47:07PM +0200, Florian Echtler wrote: > Regarding the SMC, there's actually only one key that consistently seems to > have > a different value whether the display is on or off: > > --- blank 2017-05-05 08:40:53.694565045 +0200 > +++ non_blank 2017-05-05 08:40:53.702

Re: iMac 10,1 with Ubuntu 16.04: black screen after suspend

2017-07-25 Thread Lukas Wunner
On Tue, Jul 25, 2017 at 07:14:23AM +0200, Mario Kleiner wrote: > On 07/24/2017 03:45 PM, Florian Echtler wrote: > > thanks for the hint. I've applied this patch to the v4.12 tree I'm > > currently running, and it didn't seem to make any difference (i.e. > > display stays black after suspend). > >

Re: [PATCH 2/3] Split VGA default device handler out of VGA arbiter

2017-08-04 Thread Lukas Wunner
On Fri, Aug 04, 2017 at 08:20:32PM +1000, Daniel Axtens wrote: > A system without PCI legacy resources (e.g. ARM64, powerpc) may > find that no default/boot VGA device has been marked, because the > VGA arbiter checks for legacy resource decoding before marking a > card as default. Would it be fea

Re: [git pull] drm for v4.15

2017-11-17 Thread Lukas Wunner
On Fri, Nov 17, 2017 at 08:57:53AM -0800, Linus Torvalds wrote: > On Fri, Nov 17, 2017 at 4:51 AM, Nicolai Hähnle wrote: > To see the effects of this, I picked something at random from one of > those huge AMD header files. > > I swear. It was entirely at random, and the first thing I picked. Do t

[PATCH] drm/msm/mdp4: Deduplicate bus_find_device() by name matching

2017-11-25 Thread Lukas Wunner
No need to reinvent the wheel, we have bus_find_device_by_name(). Signed-off-by: Lukas Wunner --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h

Re: nvidia vgaarb bug (was: Re: Static inline DRM functions calling into GPL-only code)

2017-12-06 Thread Lukas Wunner
On Wed, Apr 12, 2017 at 03:46:05PM -0700, Andy Ritger wrote: > On Tue, Apr 11, 2017 at 09:24:33AM +0200, Lukas Wunner wrote: > > Sorry to hijack this thread, but there's an egregious, long-standing bug > > in your driver with regards to vgaarb usage: nvidia/nv.c calls > &

[Intel-gfx] [PATCH v5 00/12] Enable GPU switching on pre-retina?MacBook Pro

2016-03-05 Thread Lukas Wunner
Hi Bastien, On Fri, Mar 04, 2016 at 04:12:27PM +, Bastien Nocera wrote: > Lukas Wunner wunner.de> writes: > > Enable GPU switching on the pre-retina MacBook Pro (2008 - 2013), v5. > > I've tested your patchset on a MacBookPro8,1, with an integrated Intel and > disc

[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 2/2] nouveau: use new vga_switcheroo power domain.

2016-03-09 Thread Lukas Wunner
Hi Dave, On Wed, Mar 09, 2016 at 04:14:05PM +1000, Dave Airlie wrote: > From: Dave Airlie > > This fixes GPU auto powerdown on the Lenovo W541, > since we advertise Windows 2013 to the ACPI layer. > > Signed-off-by: Dave Airlie > --- > drivers/gpu/drm/nouveau/nouveau_vga.c | 10 +++--- >

[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 standardise

[Intel-gfx] [PATCH v5 00/12] Enable GPU switching on pre-retina?MacBook Pro

2016-03-14 Thread Lukas Wunner
Hi Bastien, sorry for the delay. On Sat, Mar 05, 2016 at 05:31:55PM +0100, Bastien Nocera wrote: > We could, on boot, force using the integrated GPU, turning off the > discrete GPU that we're not interested in. Yes, many people "solve" this by having grub write the requisite commands to gmux' I/

[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 09:57:

[Intel-gfx] [PATCH v5 00/12] Enable GPU switching on pre-retina?MacBook Pro

2016-03-15 Thread Lukas Wunner
Hi Alex, On Sat, Mar 05, 2016 at 01:10:56PM -0500, Alex Deucher wrote: > Is there any reason to make use of the mux? Performance (lower latency => no need for framebuffer writes over PCIe), improved battery life (no need to use 2 GPUs simultaneously). Technically you can't just ignore that the m

[Intel-gfx] [PATCH v5 00/12] Enable GPU switching on pre-retina?MacBook Pro

2016-03-15 Thread Lukas Wunner
Hi Alex, On Tue, Mar 15, 2016 at 02:33:56PM -0400, Alex Deucher wrote: > On Tue, Mar 15, 2016 at 1:54 PM, Lukas Wunner wrote: > > On Sat, Mar 05, 2016 at 01:10:56PM -0500, Alex Deucher wrote: > >> Is there any reason to make use of the mux? > > > > Performance

[PATCH 2/2] nouveau: use new vga_switcheroo power domain.

2016-03-15 Thread Lukas Wunner
Hi Dave, On Thu, Mar 10, 2016 at 08:04:26AM +1000, Dave Airlie wrote: > On 10 March 2016 at 00:40, Lukas Wunner wrote: > > On Wed, Mar 09, 2016 at 04:14:05PM +1000, Dave Airlie wrote: > >> From: Dave Airlie > >> > >> This fixes GPU auto powerdown on the

[PATCH 4/7] vga_switcheroo: Cleanup header comment

2015-05-08 Thread Lukas Wunner
Hi Thierry, On Fri, May 08, 2015 at 12:50:46PM +0200, Thierry Reding wrote: > + * > + * Switcher interface - methods require for ATPX and DCM > + * - switchto - this throws the output MUX switch > + * - discrete_set_power - sets the power state for the discrete card > + * > + * GPU driver interfac

[PATCH] drm: Fix an unwanted master inheritance

2015-11-30 Thread Lukas Wunner
Hi, On Mon, Nov 30, 2015 at 04:27:50PM +0100, Thomas Hellstrom wrote: > while probably all other drivers don't care, except that it's a security > issue Hm, I don't know what the security policy is for DRM-related issues but shouldn't this be cc'ed to security at kernel.org so that it gets the at

[PATCH v1.1 03/15] vga_switcheroo: Set active attribute to false for audio clients

2015-10-01 Thread Lukas Wunner
Hi Daniel, On Thu, Sep 24, 2015 at 05:13:02PM +0200, Daniel Vetter wrote: > I added your clarification to the commit message and pulled in the patch. As requested, here's an on-list gentle reminder that a portion of this series hasn't been merged yet, specifically: [PATCH 04/15] vga_switcheroo:

[PATCH v3 0/6] Enable gpu switching on the MacBook Pro

2015-10-04 Thread Lukas Wunner
locks. (Suggested by Daniel Vetter.) Thanks a lot to the reviewers and testers for your valuable feedback. Lukas Wunner (6): vga_switcheroo: Add support for switching only the DDC apple-gmux: Add switch_ddc support drm/edid: Switch DDC when reading the EDID drm/i915: Switch DDC when

[PATCH v3 1/6] vga_switcheroo: Add support for switching only the DDC

2015-10-05 Thread Lukas Wunner
SNB + amd turks pre-retina 15"] Tested-by: Lukas Wunner [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] Cc: Seth Forshee Cc: Dave Airlie Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 98 +++- include/li

[PATCH v3 2/6] apple-gmux: Add switch_ddc support

2015-10-05 Thread Lukas Wunner
n the VBT. Modified by Lukas Wunner , 2015-08-28: Retain semantics of ->switchto handler callback to switch all pins, including DDC. Change semantics of ->switch_ddc handler callback to return previous DDC owner. Original version tried to determine previous DDC owner with find_ac

[PATCH v3 3/6] drm/edid: Switch DDC when reading the EDID

2015-10-05 Thread Lukas Wunner
. Modified by Dave Airlie , 2012-12-22: I can't figure out why I didn't like this, but I rewrote this [...] to lock/unlock the ddc lines [...]. I think I'd prefer something like that otherwise the interface got really ugly. Modified by Lukas Wunner , 2015-09-11: Move vga_s

[PATCH v3 4/6] drm/i915: Switch DDC when reading the EDID

2015-10-05 Thread Lukas Wunner
how_bug.cgi?id=61115 Tested-by: William Brown [MBP 8,2 2011 intel SNB + amd turks pre-retina 15"] Tested-by: Lukas Wunner [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] Signed-off-by: Lukas Wunner --- drivers/gpu/drm/i915/intel_lvds.c | 3 ++- 1 file changed, 2

[PATCH v3 5/6] drm/nouveau: Switch DDC when reading the EDID

2015-10-05 Thread Lukas Wunner
bugzilla.kernel.org/show_bug.cgi?id=88861 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115 Tested-by: Pierre Moreau [MBP 5,3 2009 nvidia MCP79 + G96 pre-retina 15"] Tested-by: Lukas Wunner [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] Sign

[PATCH v3 6/6] drm/radeon: Switch DDC when reading the EDID

2015-10-05 Thread Lukas Wunner
ug.cgi?id=61115 Tested-by: William Brown [MBP 8,2 2011 intel SNB + amd turks pre-retina 15"] Signed-off-by: Lukas Wunner --- drivers/gpu/drm/radeon/radeon_connectors.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/dr

[PATCH v3 0/6] Enable gpu switching on the MacBook Pro

2015-10-05 Thread Lukas Wunner
Hi, I've also pushed this series to GitHub now to ease reviewing: https://github.com/l1k/linux/commits/mbp_switcheroo_v3 Thanks, Lukas

[Nouveau] [PATCH v3 0/6] Enable gpu switching on the MacBook Pro

2015-10-05 Thread Lukas Wunner
Hi Evan, On Mon, Oct 05, 2015 at 10:15:53AM -0400, Evan Foss wrote: > On Mon, Oct 5, 2015 at 9:23 AM, Lukas Wunner wrote: > > I've also pushed this series to GitHub now to ease reviewing: > > https://github.com/l1k/linux/commits/mbp_switcheroo_v3 > > So to test thi

[Nouveau] [PATCH v3 0/6] Enable gpu switching on the MacBook Pro

2015-10-05 Thread Lukas Wunner
Hi Evan, On Mon, Oct 05, 2015 at 11:23:21AM -0400, Evan Foss wrote: > $ dmesg|grep Apple > [0.00] efi: EFI v1.10 by Apple > [0.00] DMI: Apple Inc. MacBookPro9,1/Mac- > 4B7AC7E43945597E, > BIOS MBP91.88Z.00D3.B08.1208081132 08/08/2012 That was the last of the pre-retinas. I have ex

[PATCH v3 1/6] vga_switcheroo: Add support for switching only the DDC

2015-10-06 Thread Lukas Wunner
Hi Daniel, thank you for taking a look at the patch set and shepherding this through the review process. On Tue, Oct 06, 2015 at 09:27:24AM +0200, Daniel Vetter wrote: > On Fri, Aug 14, 2015 at 06:50:15PM +0200, Lukas Wunner wrote: > > Don't lock vgasr_mutex in _lock_ddc()

[PATCH v3 1/6] vga_switcheroo: Add support for switching only the DDC

2015-10-06 Thread Lukas Wunner
Hi Daniel, On Tue, Oct 06, 2015 at 01:10:00PM +0200, Daniel Vetter wrote: > On Tue, Oct 06, 2015 at 12:10:48PM +0200, Lukas Wunner wrote: > > On Tue, Oct 06, 2015 at 09:27:24AM +0200, Daniel Vetter wrote: > > > Also while reading the patch I realized that the new lock really

[PATCH v3 6/6] drm/radeon: Switch DDC when reading the EDID

2015-10-08 Thread Lukas Wunner
Hi Alex, On Wed, Oct 07, 2015 at 11:14:43PM -0400, Alex Deucher wrote: > On Sat, Sep 12, 2015 at 3:44 AM, Lukas Wunner wrote: > > The pre-retina MacBook Pro uses an LVDS panel and a gmux controller > > to switch the panel between its two GPUs. The panel mode in VBIOS > > is

[PATCH RFC 0/5] Re: drm/doc: Rename docbook to gpu.tmpl

2015-10-12 Thread Lukas Wunner
ed for markdown are apparent from this branch as it's based on drm-next): https://github.com/l1k/linux/commits/gpu_docs Best regards, Lukas Daniel Vetter (1): drm/doc: Rename docbook to gpu.tmpl Lukas Wunner (4): drm/doc: Remove TODO about drm_vblank_pre/post_modeset() gpu/doc: Fix up r

[PATCH RFC 1/5] drm/doc: Remove TODO about drm_vblank_pre/post_modeset()

2015-10-10 Thread Lukas Wunner
Necessary for Daniel's rename commit to apply cleanly. Signed-off-by: Lukas Wunner --- Documentation/DocBook/drm.tmpl | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index 308b141..da1060c 100644 --- a/Documentation/Do

[PATCH RFC 3/5] gpu/doc: Fix up remaining occurrences of old document title

2015-10-11 Thread Lukas Wunner
Following Daniel's renaming of the document. Signed-off-by: Lukas Wunner --- Documentation/DocBook/gpu.tmpl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl index 94c600c..e506c70 100644

[PATCH RFC 4/5] gpu/doc: Add vga_switcheroo documentation

2015-10-11 Thread Lukas Wunner
Requires Markdown support. Signed-off-by: Lukas Wunner --- Documentation/DocBook/gpu.tmpl | 76 +++--- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl index e506c70..3a811d4 100644

[PATCH RFC 5/5] gpu/doc: Convert to markdown harder

2015-10-12 Thread Lukas Wunner
A quick workaround is to replace *_locked() by X_locked(). Cc: Danilo Cesar Lemes de Paula Signed-off-by: Lukas Wunner --- include/drm/drm_vma_manager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_vma_manager.h b/include/drm/drm_vma_manager.h index 2ca44db

[PATCH 0/9] vga_switcheroo cleanup

2015-10-12 Thread Lukas Wunner
eanup Thank you & best regards, Lukas Lukas Wunner (9): vga_switcheroo: Use enum vga_switcheroo_state instead of int vga_switcheroo: Use VGA_SWITCHEROO_UNKNOWN_ID instead of -1 vga_switcheroo: Use enum vga_switcheroo_client_id instead of int ALSA: hda - Spell vga_switcheroo consistently

[PATCH 1/9] vga_switcheroo: Use enum vga_switcheroo_state instead of int

2015-10-12 Thread Lukas Wunner
Signed-off-by: Lukas Wunner Reviewed-by: Jani Nikula --- drivers/gpu/vga/vga_switcheroo.c | 6 +++--- include/linux/vga_switcheroo.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 1acbe20

[PATCH 2/9] vga_switcheroo: Use VGA_SWITCHEROO_UNKNOWN_ID instead of -1

2015-10-12 Thread Lukas Wunner
Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 17 + include/linux/vga_switcheroo.h | 4 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index a7870d2..9896305 100644

[PATCH 3/9] vga_switcheroo: Use enum vga_switcheroo_client_id instead of int

2015-10-12 Thread Lukas Wunner
Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 17 ++--- include/linux/vga_switcheroo.h | 6 +++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 9896305..af0d372

[PATCH 4/9] ALSA: hda - Spell vga_switcheroo consistently

2015-10-12 Thread Lukas Wunner
everywhere. Signed-off-by: Lukas Wunner Reviewed-by: Takashi Iwai --- sound/pci/hda/hda_controller.h | 2 +- sound/pci/hda/hda_intel.c | 12 ++-- sound/pci/hda/hda_intel.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/pci/hda/hda_controller.h b/sou

[PATCH 5/9] drm/i915: Drop unnecessary #include

2015-10-12 Thread Lukas Wunner
Commit 599bbb9de0fe ("drm/i915: i915 cannot provide switcher services.") removed all remaining vga_switcheroo symbols from intel_acpi.c but left the include. Drop it. Signed-off-by: Lukas Wunner --- drivers/gpu/drm/i915/intel_acpi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/d

[PATCH 6/9] drm/radeon: Drop unnecessary #include

2015-10-12 Thread Lukas Wunner
eon_asic.c"). Added to radeon_bios.c by commit 6a9ee8af344e ("vga_switcheroo: initial implementation (v15)"). Signed-off-by: Lukas Wunner --- drivers/gpu/drm/radeon/radeon_acpi.c | 1 - drivers/gpu/drm/radeon/radeon_asic.c | 1 - drivers/gpu/drm/radeon/radeon_bios.c | 1 - 3

[PATCH 7/9] drm/amdgpu: Drop unnecessary #include

2015-10-12 Thread Lukas Wunner
it 6a9ee8af344e ("vga_switcheroo: initial implementation (v15)"). Signed-off-by: Lukas Wunner --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/d

[PATCH 8/9] drm/radeon: Fix kernel-doc copy/paste snafu

2015-10-12 Thread Lukas Wunner
Introduced by f482a1419545 ("drm/radeon: document radeon_kms.c"). Signed-off-by: Lukas Wunner --- drivers/gpu/drm/radeon/radeon_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c ind

[PATCH 9/9] drm/amdgpu: Fix kernel-doc copy/paste snafu

2015-10-12 Thread Lukas Wunner
Introduced by f482a1419545 ("drm/radeon: document radeon_kms.c") and inherited by the amdgpu fork. Signed-off-by: Lukas Wunner --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

[PATCH 8/9] drm/radeon: Fix kernel-doc copy/paste snafu

2015-10-12 Thread Lukas Wunner
Hi Alex, On Mon, Oct 12, 2015 at 12:02:13PM -0400, Alex Deucher wrote: > On Mon, Oct 12, 2015 at 5:44 AM, Lukas Wunner wrote: > > Introduced by f482a1419545 ("drm/radeon: document radeon_kms.c"). > > > > Signed-off-by: Lukas Wunner > > --- > &g

[PATCH v4 0/6] Enable gpu switching on the MacBook Pro

2015-10-12 Thread Lukas Wunner
tallments: v1: http://lists.freedesktop.org/archives/dri-devel/2015-April/081515.html v2: http://lists.freedesktop.org/archives/dri-devel/2015-August/088156.html v3: http://lists.freedesktop.org/archives/dri-devel/2015-October/091741.html Lukas Wunner (6): vga_switcheroo: Add support for switching

[PATCH v4 1/6] vga_switcheroo: Add support for switching only the DDC

2015-10-12 Thread Lukas Wunner
g.cgi?id=88861 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115 Tested-by: Lukas Wunner [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] Cc: Seth Forshee Cc: Dave Airlie Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 66 ++

[PATCH v4 2/6] apple-gmux: Add switch_ddc support

2015-10-12 Thread Lukas Wunner
n the VBT. Modified by Lukas Wunner , 2015-10-07: Advertise ->switch_ddc handler callback only on the pre-retina Macbook Pro. The retina uses eDP and its mux is incapable of switching the AUX channel separately from the main link. It's an NXP CBTL06142 (alternate parts

[PATCH v4 3/6] drm/edid: Switch DDC when reading the EDID

2015-10-12 Thread Lukas Wunner
. Modified by Dave Airlie , 2012-12-22: I can't figure out why I didn't like this, but I rewrote this [...] to lock/unlock the ddc lines [...]. I think I'd prefer something like that otherwise the interface got really ugly. Modified by Lukas Wunner , 2015-09-11: Move vga_s

[PATCH v4 4/6] drm/i915: Switch DDC when reading the EDID

2015-10-12 Thread Lukas Wunner
61115 Tested-by: William Brown [MBP 8,2 2011 intel SNB + amd turks pre-retina 15"] Tested-by: Lukas Wunner [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] Signed-off-by: Lukas Wunner --- drivers/gpu/drm/i915/intel_lvds.c | 3 ++- 1 file changed, 2 insertions

[PATCH v4 5/6] drm/nouveau: Switch DDC when reading the EDID

2015-10-12 Thread Lukas Wunner
la.kernel.org/show_bug.cgi?id=88861 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115 Tested-by: Lukas Wunner [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] Signed-off-by: Lukas Wunner --- drivers/gpu/drm/nouveau/nouveau_connector.c | 13 +++-- 1 file changed

[PATCH v4 6/6] drm/radeon: Switch DDC when reading the EDID

2015-10-12 Thread Lukas Wunner
61115 Tested-by: William Brown [MBP 8,2 2011 intel SNB + amd turks pre-retina 15"] Signed-off-by: Lukas Wunner --- drivers/gpu/drm/radeon/radeon_connectors.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon

[PATCH RFC 2/5] drm/doc: Rename docbook to gpu.tmpl

2015-10-07 Thread Lukas Wunner
usion let's rename the top-level to reflect reality. And yes I'm already looking forward to when we need to replace the G in GPU with a * ;-) Inspired by a thread with Lukas since he refused to include the vga_switcheroo docs into the drm docs because it's not drm. Cc: Lukas W

[PATCH RFC 5/5] gpu/doc: Convert to markdown harder

2015-10-14 Thread Lukas Wunner
Hi, On Wed, Oct 14, 2015 at 11:04:37AM -0300, Danilo Cesar Lemes de Paula wrote: > On 10/14/2015 10:59 AM, Daniel Vetter wrote: > > On Mon, Oct 12, 2015 at 09:10:33AM +0200, Lukas Wunner wrote: > >> This snippet... > >> > >> * Lock VMA manager for e

[PATCH v2 18/22 EXPERIMENTAL] vga_switcheroo: Allow using active client as proxy when reading DDC/AUX

2015-07-29 Thread Lukas Wunner
SNB + amd turks pre-retina] Tested-by: Lukas Wunner [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina] Tested-by: Bruno Bierbaumer [MBP 11,3 2013 intel HSW + nvidia GK107 retina -- work in progress] Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switche

[PATCH v2 21/22 EXPERIMENTAL] drm/nouveau/i2c: Use vga_switcheroo active client as proxy when reading DDC/AUX

2015-07-30 Thread Lukas Wunner
rg/show_bug.cgi?id=88861 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115 Tested-by: Paul Hordiienko [MBP 6,2 2010 intel ILK + nvidia GT216 pre-retina] Tested-by: William Brown [MBP 8,2 2011 intel SNB + amd turks pre-retina] Tested-by: Lukas Wunner [MBP 9,1 2012 inte

[PATCH] drm: Fix return value of drm_framebuffer_init()

2015-10-15 Thread Lukas Wunner
drm_framebuffer_init() pretends success if drm_mode_object_get() failed. Reinstate the original behaviour. Also fix erroneous kernel-doc of drm_mode_object_get(). Fixes: 4b096ac10da0 ("drm: revamp locking around fb creation/ destruction") Cc: Daniel Vetter Signed-off-by: Lukas Wunner ---

[PATCH 2/9] vga_switcheroo: Use VGA_SWITCHEROO_UNKNOWN_ID instead of -1

2015-10-15 Thread Lukas Wunner
Hi Daniel, On Tue, Oct 13, 2015 at 09:28:13AM +0200, Daniel Vetter wrote: > On Mon, Oct 12, 2015 at 12:09:53PM -0400, Alex Deucher wrote: > > On Fri, Aug 28, 2015 at 7:30 AM, Lukas Wunner wrote: > > > Signed-off-by: Lukas Wunner > > Reviewed-by: Alex Deucher > >

[PATCH 0/1] vga_switcheroo: Constify vga_switcheroo_handler

2015-10-20 Thread Lukas Wunner
Another vga_switcheroo cleanup. Maintainers, is it okay to include the one-line change of each driver in here or do you want that split into separate patches? Thanks, Lukas Lukas Wunner (1): vga_switcheroo: Constify vga_switcheroo_handler drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c

[PATCH 1/1] vga_switcheroo: Constify vga_switcheroo_handler

2015-10-18 Thread Lukas Wunner
/x86/apple-gmux.ko: - 7 .rodata 0140 + 7 .rodata 0160 - 11 .data 00e0 + 11 .data 00b8 Cc: Ben Skeggs Cc: Darren Hart Cc: Alex Deucher Signed-off-by: Lukas Wunner --- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 2 +- drivers/gpu/d

[PATCH 05/15] vga_switcheroo: Drop client power state VGA_SWITCHEROO_INIT

2015-10-25 Thread Lukas Wunner
/tree/include/linux/vga_switcheroo.h?h=drm-next#n38 Thanks & best regards, Lukas On Fri, Oct 02, 2015 at 10:22:48AM +0200, Daniel Vetter wrote: > On Tue, Sep 08, 2015 at 02:17:47PM +0200, Lukas Wunner wrote: > > hda_intel.c:azx_probe() defers initialization of an audio controll

[PATCH v4 2/6] apple-gmux: Add switch_ddc support

2015-10-29 Thread Lukas Wunner
Hi Alex, On Mon, Oct 12, 2015 at 05:10:20PM -0400, Alex Deucher wrote: > On Mon, Oct 12, 2015 at 5:07 PM, Alex Deucher > wrote: > > On Fri, Aug 14, 2015 at 12:18 PM, Lukas Wunner wrote: > >> Originally by Seth Forshee , 2012-10-04: > >> The gmux allows muxing

[PATCH 1/6] scripts/kernel-doc: Replacing highlights hash by an array

2015-09-13 Thread Lukas Wunner
Hi, On Sun, Sep 13, 2015 at 02:36:47PM -0600, Jonathan Corbet wrote: > On Mon, 7 Sep 2015 17:01:59 -0300 > Danilo Cesar Lemes de Paula wrote: > > The "highlight" code is very sensible to the order of the hash keys, > > but the order of the keys cannot be predicted. It generates > > faulty DocBoo

[PATCH 02/15] DocBook: Add vga_switcheroo Subsystem Guide

2015-09-17 Thread Lukas Wunner
This is not part of drm.tmpl as vga_switcheroo is a subsystem of its own which interfaces not just with DRM but also with multiplexer drivers, ALSA and power management. Requires Markdown support. Signed-off-by: Lukas Wunner --- Documentation/DocBook/Makefile| 5 +- Documentation

[PATCH 05/15] vga_switcheroo: Drop client power state VGA_SWITCHEROO_INIT

2015-09-08 Thread Lukas Wunner
oo enabled), but as shown above this can fail. Drop VGA_SWITCHEROO_INIT to solve this. Cc: Takashi Iwai Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 2 -- include/linux/vga_switcheroo.h | 5 - 2 files changed, 7 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c

[PATCH 06/15] vga_switcheroo: Use enum vga_switcheroo_state instead of int

2015-09-17 Thread Lukas Wunner
Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 6 +++--- include/linux/vga_switcheroo.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 845e47d..7b53246 100644 --- a/drivers

[PATCH 07/15] vga_switcheroo: Use VGA_SWITCHEROO_UNKNOWN_ID instead of -1

2015-09-17 Thread Lukas Wunner
Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 17 + include/linux/vga_switcheroo.h | 4 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 7b53246..bbd0a8e 100644

[PATCH 08/15] vga_switcheroo: Use enum vga_switcheroo_client_id instead of int

2015-09-17 Thread Lukas Wunner
Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 17 ++--- include/linux/vga_switcheroo.h | 6 +++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index bbd0a8e..6e0e705

[PATCH 09/15] vga_switcheroo: Sort headers alphabetically

2015-09-05 Thread Lukas Wunner
Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 6e0e705..578aa47 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b

[PATCH 10/15] ALSA: hda - Spell vga_switcheroo consistently

2015-09-04 Thread Lukas Wunner
everywhere. Signed-off-by: Lukas Wunner --- sound/pci/hda/hda_controller.h | 2 +- sound/pci/hda/hda_intel.c | 12 ++-- sound/pci/hda/hda_intel.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controll

[PATCH 11/15] drm/i915: Spell vga_switcheroo consistently

2015-09-04 Thread Lukas Wunner
everywhere. Signed-off-by: Lukas Wunner --- drivers/gpu/drm/i915/intel_acpi.c | 2 +- drivers/gpu/drm/i915/intel_panel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c index d96eee1..8b13b9d 100644 --- a/d

[PATCH 12/15] drm/nouveau: Spell vga_switcheroo consistently

2015-09-05 Thread Lukas Wunner
everywhere. Signed-off-by: Lukas Wunner --- drivers/gpu/drm/nouveau/nouveau_acpi.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_vga.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index df2d98

[PATCH 13/15] drm/radeon: Spell vga_switcheroo consistently

2015-09-05 Thread Lukas Wunner
everywhere. Signed-off-by: Lukas Wunner --- drivers/gpu/drm/radeon/radeon_atpx_handler.c | 2 +- drivers/gpu/drm/radeon/radeon_device.c | 2 +- drivers/gpu/drm/radeon/radeon_kms.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_atpx

[PATCH 14/15] drm/amdgpu: Spell vga_switcheroo consistently

2015-09-05 Thread Lukas Wunner
everywhere. Signed-off-by: Lukas Wunner --- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 15/15] drm: Spell vga_switcheroo consistently

2015-09-05 Thread Lukas Wunner
everywhere. Signed-off-by: Lukas Wunner --- Documentation/DocBook/drm.tmpl | 2 +- drivers/gpu/drm/omapdrm/omap_drv.c | 2 +- include/linux/fb.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.

vga_switcheroo docs (was: Re: [PATCH v2.1 1/3] vga_switcheroo: Add support for switching only the DDC)

2015-09-17 Thread Lukas Wunner
Hi Daniel, On Tue, Aug 25, 2015 at 10:12:50AM +0200, Daniel Vetter wrote: > Since you're just diggin around in switcheroo code it would be awesome to > write proper kerneldoc for all the functions exposed to drivers, move the > above to a proper kerneldoc for the vfunc tables Alright, a patch set

[PATCH 01/15] vga_switcheroo: Document _ALL_ the things!

2015-09-17 Thread Lukas Wunner
This adds an "Overview" DOC section plus two DOC sections for the modes of use ("Manual switching and manual power control" and "Driver power control"). Also included is kernel-doc for all public functions, structs and enums. Signed-off-by: Lukas Wunner --- dr

[PATCH 03/15] vga_switcheroo: Set active attribute to false for audio clients

2015-09-17 Thread Lukas Wunner
ole caller, hda_intel.c:register_vga_switcheroo(). vga_switcheroo_register_audio_client() was introduced by 3e9e63dbd374 ("vga_switcheroo: Add the support for audio clients"). Its use in hda_intel.c was introduced by a82d51ed24bb ("ALSA: hda - Support VGA-switcheroo"). Cc: Takashi Iwai Signed-off-

[PATCH 04/15] vga_switcheroo: Add missing locking

2015-09-17 Thread Lukas Wunner
a bit to be able to release vgasr_mutex immediately after iterating over the client list. Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 50 +--- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo

[PATCH 03/15] vga_switcheroo: Set active attribute to false for audio clients

2015-09-17 Thread Lukas Wunner
/85dc1f299dec5a52266d82e2f4c02adfb04f77e6 On Thu, Aug 27, 2015 at 04:43:43PM +0200, Lukas Wunner wrote: > The active attribute in struct vga_switcheroo_client denotes whether > the outputs are currently switched to this client. The attribute is > only meaningful for vga clients. It is never

[PATCH 01/15] vga_switcheroo: Document _ALL_ the things!

2015-09-17 Thread Lukas Wunner
Hi Danilo, On Thu, Sep 17, 2015 at 01:34:54PM -0300, Danilo Cesar Lemes de Paula wrote: > > - * GPU driver interface > > - * - set_gpu_state - this should do the equiv of s/r for the card > > - * - this should *not* set the discrete power state > > Did you check if this creates th

<    1   2   3   4   5   >