[PATCH v5 00/12] Enable GPU switching on pre-retina MacBook Pro
dvhart at infradead.org
Mon Feb 8 19:10:00 CET 2016
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.
> 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:
> * 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
> 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?
No objection from the platform-driver-x86 side. I can pull these separately once
the core is in, or these can be included with that core (preferred) with my
Reviewed-by for 1, 3, 4, and 9.
Reviewed-by: Darren Hart <dvhart at linux.intel.com>
Intel Open Source Technology Center
More information about the dri-devel