Re: [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 exactly the same machine,
so yes, it should work just fine on that one.

Best regards,

Lukas
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


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

2015-10-05 Thread Evan Foss
On Mon, Oct 5, 2015 at 11:17 AM, Lukas Wunner  wrote:
> 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 this all someone has to do is pull this and try it? No
>> patching required?
>
> Yes. But if you don't already have a kernel git repo, this will be
> a > 1 GByte download.

2012
Macbook Pro 9,2

$ 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

> Which MacBook Pro model do you want to test this on? As noted in the
> cover letter, this will only work on pre-retinas and only if the
> apple-gmux module loads before the DRM drivers. You can try to ensure
> the latter by editing modules.dep, or grab this tarball which contains
> reprobing patches on top:
> http://wunner.de/mbp_switcheroo_v3_reprobe_4.3-rc4pre.tar.gz

Ok thanks

> Best regards,
>
> Lukas

Evan

-- 
Home
http://evanfoss.googlepages.com/
Work
http://forge.abcd.harvard.edu/gf/project/epl_engineering/wiki/
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


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

2015-10-05 Thread Pierre Moreau
The repo is a fork of Linus' tree, with the patches on top of it. So you just 
need to build that modified version of the kernel and boot it. :-)

Pierre

> On 05 Oct 2015, at 16:15, Evan Foss  wrote:
> 
>> On Mon, Oct 5, 2015 at 9:23 AM, Lukas Wunner  wrote:
>> Hi,
>> 
>> I've also pushed this series to GitHub now to ease reviewing:
>> https://github.com/l1k/linux/commits/mbp_switcheroo_v3
> 
> So to test this all someone has to do is pull this and try it? No
> patching required?
> 
>> Thanks,
>> 
>> Lukas
>> ___
>> Nouveau mailing list
>> Nouveau@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/nouveau
> 
> 
> 
> -- 
> Home
> http://evanfoss.googlepages.com/
> Work
> http://forge.abcd.harvard.edu/gf/project/epl_engineering/wiki/
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [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 this all someone has to do is pull this and try it? No
> patching required?

Yes. But if you don't already have a kernel git repo, this will be
a > 1 GByte download.

Which MacBook Pro model do you want to test this on? As noted in the
cover letter, this will only work on pre-retinas and only if the
apple-gmux module loads before the DRM drivers. You can try to ensure
the latter by editing modules.dep, or grab this tarball which contains
reprobing patches on top:
http://wunner.de/mbp_switcheroo_v3_reprobe_4.3-rc4pre.tar.gz

Best regards,

Lukas
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


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

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

So to test this all someone has to do is pull this and try it? No
patching required?

> Thanks,
>
> Lukas
> ___
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau



-- 
Home
http://evanfoss.googlepages.com/
Work
http://forge.abcd.harvard.edu/gf/project/epl_engineering/wiki/
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [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 mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


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

2015-10-05 Thread Lukas Wunner
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 notoriously bogus on these machines and some models have no
VBIOS at all, so the inactive GPU cannot set up its LVDS output.

Extend vga_switcheroo to support switching only the DDC lines.
Introduce a drm_get_edid_switcheroo() helper which uses this feature.
Amend i915, nouveau and radeon to call it for LVDS connectors.

This only enables EDID probing on the pre-retina MBP (2008 - 2013),
and only under the condition that apple-gmux loads before the DRM
drivers. Later patches will address reprobing of the DRM drivers
if apple-gmux loads late.

The retina MBP (2012 - present) uses eDP and is apparently not
capable of switching AUX separately from the main link.
This will also be addressed in later patches.


Previous installments:
v1: http://lists.freedesktop.org/archives/dri-devel/2015-April/081515.html
v2: http://lists.freedesktop.org/archives/dri-devel/2015-August/088156.html


Changes since v2:
  * Previously the DDC locking happened in drm_get_edid() and thus
was done for all DRM drivers, regardless if they are ever used
on muxed machines. Now this is moved to a separate helper which
is only called by relevant drivers and only for LVDS connectors.
(Suggested by Thierry Reding and seconded by Alex Deucher and
Daniel Vetter.)
  * Squashed commits, overhauled locking, added kernel-doc for new
public functions and 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 reading the EDID
  drm/nouveau: Switch DDC when reading the EDID
  drm/radeon: Switch DDC when reading the EDID

 drivers/gpu/drm/drm_edid.c  | 26 
 drivers/gpu/drm/i915/intel_lvds.c   |  3 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c | 13 +++-
 drivers/gpu/drm/radeon/radeon_connectors.c  |  4 ++
 drivers/gpu/vga/vga_switcheroo.c| 98 -
 drivers/platform/x86/apple-gmux.c   | 23 +++
 include/drm/drm_crtc.h  |  2 +
 include/linux/vga_switcheroo.h  |  9 +++
 8 files changed, 173 insertions(+), 5 deletions(-)

-- 
1.8.5.2 (Apple Git-48)

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau