All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Paul Hordiienko
	<pvt.gord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	William Brown <william-n62phY/1UFdqFZ3NbRY2NA@public.gmane.org>,
	Seth Forshee
	<seth.forshee-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
	Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	Dave Airlie <airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Darren Hart <dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Subject: Re: [PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro
Date: Mon, 1 Feb 2016 23:49:44 +0100	[thread overview]
Message-ID: <20160201224944.GA12944@wunner.de> (raw)
In-Reply-To: <cover.1452525860.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>

Hi,

On Mon, Jan 11, 2016 at 08:09:20PM +0100, Lukas Wunner wrote:
> Enable GPU switching on the pre-retina MacBook Pro (2008 - 2013), v5.

This series hasn't seen any reviews or acks unfortunately.
Any takers?

Merging this would allow fdo #61115 to be closed
(currently assigned to intel-gfx).

FWIW this series has in the meantime been tested by more folks:

Tested-by: Pierre Moreau <pierre.morrow@free.fr>
    [MBP  5,3 2009  nvidia MCP79 + G96        pre-retina  15"]
Tested-by: Paul Hordiienko <pvt.gord@gmail.com>
    [MBP  6,2 2010  intel ILK + nvidia GT216  pre-retina  15"]
Tested-by: William Brown <william@blackhats.net.au>
    [MBP  8,2 2011  intel SNB + amd turks     pre-retina  15"]
Tested-by: Lukas Wunner <lukas@wunner.de>
    [MBP  9,1 2012  intel IVB + nvidia GK107  pre-retina  15"]

On the latter three models it worked fine. On Pierre Moreau's machine
the discrete nvidia G96 locks up when woken. This happened in the past
as well but not on the first wake but only on the 10th or so. Since it
works fine on the GT216 and GK107, I'm guessing we've got a regression
in the wakeup code for the G96 which is somehow triggered by this patch
set (more specifically: triggered by being able to retrieve the proper
panel resolution and configure a crtc). It needs to be fixed but isn't
a showstopper for this series IMHO. (Arguably being able to retrieve
EDID but then locking up on switching isn't really worse than not being
able to retrieve EDID in the first place.)

Thanks,

Lukas

> 
> The main obstacle on these machines is that the panel mode in VBIOS
> is bogus. Fortunately gmux can switch DDC independently from the
> display, thereby allowing the inactive GPU to probe the panel's EDID.
> 
> In short, vga_switcheroo and apple-gmux are amended with hooks to
> switch DDC, DRM core is amended with a drm_get_edid_switcheroo() helper,
> and relevant drivers are amended to call that for LVDS outputs.
> 
> The retina MacBook Pro (2012 - present) uses eDP and cannot switch
> AUX independently from the main link. The main obstacle there is link
> training, I'm currently working on this, it will be addressed in a
> future patch set.
> 
> This series is also reviewable on GitHub:
> https://github.com/l1k/linux/commits/mbp_switcheroo_v5
> 
> Changes:
> 
> * New patch [01/12]: vga_switcheroo handler flags
>   Alex Deucher asked if this series might regress on non-Apple laptops.
>   To address this concern, I let handlers declare their capabilities in
>   a bitmask. DRM drivers call drm_get_edid_switcheroo() only if the
>   handler has set the VGA_SWITCHEROO_CAN_SWITCH_DDC flag.
>   Currently just one other flag is defined which is used on retinas.
> 
> * Changed patch [02/12]: vga_switcheroo DDC locking
>   Rename ddc_lock to mux_hw_lock, suggested by Daniel Vetter.
> 
> * New patch [03/12]: track switch state of apple-gmux
>   Fixes a bug in previous versions of this series which occurred if
>   the system was suspended while DDC was temporarily switched:
>   On resume DDC was switched to the wrong GPU.
> 
> * New patches [09/12 - 12/12]: deferred probing
>   Previously I used connector reprobing if the inactive GPU's driver
>   loaded before gmux. I've ditched that in favor of deferred driver
>   probing, which is much simpler. Thanks to Daniel Vetter for the
>   suggestion.
> 
> Caution: Patch [09/12] depends on a new acpi_dev_present() API which
> will land in 4.5 via Rafael J. Wysocki's tree.
> 
> I would particularly be interested in feedback on the handler flags
> patch [01/12]. I'm not 100% happy with the number of characters
> required to query the flags (e.g.: if (vga_switcheroo_handler_flags() &
> VGA_SWITCHEROO_CAN_SWITCH_DDC)), but failed to come up with something
> shorter. Thierry Reding used a struct of bools instead of a bitmask
> for his recent drm_dp_link_caps patches. Maybe use that instead?
> http://lists.freedesktop.org/archives/dri-devel/2015-December/097025.html
> 
> Thanks,
> 
> Lukas
> 
> 
> Lukas Wunner (12):
>   vga_switcheroo: Add handler flags infrastructure
>   vga_switcheroo: Add support for switching only the DDC
>   apple-gmux: Track switch state
>   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
>   apple-gmux: Add helper for presence detect
>   drm/i915: Defer probe if gmux is present but its driver isn't
>   drm/nouveau: Defer probe if gmux is present but its driver isn't
>   drm/radeon: Defer probe if gmux is present but its driver isn't
> 
>  Documentation/DocBook/gpu.tmpl                   |   5 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c |   3 +-
>  drivers/gpu/drm/drm_edid.c                       |  26 +++++
>  drivers/gpu/drm/i915/i915_drv.c                  |  12 +++
>  drivers/gpu/drm/i915/intel_lvds.c                |   8 +-
>  drivers/gpu/drm/nouveau/nouveau_acpi.c           |   2 +-
>  drivers/gpu/drm/nouveau/nouveau_connector.c      |  21 +++-
>  drivers/gpu/drm/nouveau/nouveau_drm.c            |  11 +++
>  drivers/gpu/drm/radeon/radeon_atpx_handler.c     |   3 +-
>  drivers/gpu/drm/radeon/radeon_connectors.c       |   6 ++
>  drivers/gpu/drm/radeon/radeon_drv.c              |  11 +++
>  drivers/gpu/vga/vga_switcheroo.c                 | 119 ++++++++++++++++++++++-
>  drivers/platform/x86/apple-gmux.c                | 111 ++++++++++++++++-----
>  include/drm/drm_crtc.h                           |   2 +
>  include/linux/apple-gmux.h                       |  39 ++++++++
>  include/linux/vga_switcheroo.h                   |  36 ++++++-
>  16 files changed, 382 insertions(+), 33 deletions(-)
>  create mode 100644 include/linux/apple-gmux.h
> 
> -- 
> 1.8.5.2 (Apple Git-48)
> 
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2016-02-01 22:49 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 19:09 [PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 05/12] drm/edid: Switch DDC when reading the EDID Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 07/12] drm/nouveau: " Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 09/12] apple-gmux: Add helper for presence detect Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 06/12] drm/i915: Switch DDC when reading the EDID Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 10/12] drm/i915: Defer probe if gmux is present but its driver isn't Lukas Wunner
2016-02-09  9:04   ` Daniel Vetter
2016-02-14 12:10     ` Lukas Wunner
2016-02-14 12:46       ` Daniel Vetter
2016-02-16 15:58         ` Lukas Wunner
2016-02-16 16:08           ` Daniel Vetter
2016-02-18 20:34             ` Lukas Wunner
2016-02-18 21:39               ` Daniel Vetter
2016-02-18 22:20                 ` Lukas Wunner
2016-02-18 23:11                   ` Daniel Vetter
2016-02-18 23:53                     ` Deucher, Alexander
2016-01-11 19:09 ` [PATCH v5 02/12] vga_switcheroo: Add support for switching only the DDC Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 03/12] apple-gmux: Track switch state Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 01/12] vga_switcheroo: Add handler flags infrastructure Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 04/12] apple-gmux: Add switch_ddc support Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 11/12] drm/nouveau: Defer probe if gmux is present but its driver isn't Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 12/12] drm/radeon: " Lukas Wunner
2016-01-11 19:09 ` [PATCH v5 08/12] drm/radeon: Switch DDC when reading the EDID Lukas Wunner
     [not found] ` <cover.1452525860.git.lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2016-02-01 22:49   ` Lukas Wunner [this message]
2016-02-02  1:10     ` [PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro Dave Airlie
2016-02-02  1:19       ` Dave Airlie
2016-02-02 15:03       ` Lukas Wunner
     [not found]     ` <20160201224944.GA12944-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2016-02-02  6:33       ` Pierre Moreau
2016-02-08 18:10 ` Darren Hart
     [not found]   ` <20160208181000.GL1779-Z5kFBHtJu+EzCVHREhWfF0EOCMrvLtNR@public.gmane.org>
2016-02-09  9:01     ` Daniel Vetter
2016-03-04 16:12 ` Bastien Nocera
2016-03-05 14:16   ` [Intel-gfx] [PATCH v5 00/12] Enable GPU switching on pre-retina?MacBook Pro Lukas Wunner
2016-03-05 16:31     ` Bastien Nocera
2016-03-09 23:30       ` Dave Airlie
2016-03-10 15:29         ` Bastien Nocera
2016-03-10 15:33           ` Bastien Nocera
2016-03-14 12:41       ` [Intel-gfx] " Lukas Wunner
2016-03-14 13:37         ` Bastien Nocera
2016-03-15  7:51           ` Daniel Vetter
2016-03-15 11:10           ` [Intel-gfx] " Dave Airlie
2016-03-15 11:55             ` Bastien Nocera
2016-04-05 16:59         ` Bastien Nocera
2016-04-05 17:43           ` Lukas Wunner
2016-03-05 17:28     ` [Intel-gfx] " Bastien Nocera
2016-03-05 18:10     ` Alex Deucher
2016-03-15 17:54       ` Lukas Wunner
2016-03-15 18:33         ` Alex Deucher
2016-03-15 20:41           ` Lukas Wunner

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=20160201224944.GA12944@wunner.de \
    --to=lukas-jfq808j9c/izqb+pc5nmwq@public.gmane.org \
    --cc=airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pvt.gord-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=seth.forshee-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=william-n62phY/1UFdqFZ3NbRY2NA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.