drm/nouveau: Defer probe if gmux is present but its driver isn't
authorLukas Wunner <lukas@wunner.de>
Mon, 11 Jan 2016 19:09:20 +0000 (20:09 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 9 Feb 2016 10:21:12 +0000 (11:21 +0100)
commit98b3a3402eb6e38c3bf5dd4281e60e1f186f0041
tree004f9b16321a3b70651fc6f5fdcbb764aee3eea3
parent704ab614ec1201138032003c03113a81526638ab
drm/nouveau: Defer probe if gmux is present but its driver isn't

gmux is a microcontroller built into dual GPU MacBook Pros.
On pre-retina MBPs, if we're the inactive GPU, we need apple-gmux
to temporarily switch DDC so that we can probe the panel's EDID.

The checks for CONFIG_VGA_ARB and CONFIG_VGA_SWITCHEROO are necessary
because if either of them is disabled but gmux is present, the driver
would never load, even if we're the active GPU. (vga_default_device()
would evaluate to NULL and vga_switcheroo_handler_flags() would
evaluate to 0.)

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115
Tested-by: Lukas Wunner <lukas@wunner.de>
    [MBP  9,1 2012  intel IVB + nvidia GK107  pre-retina  15"]
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/d9542ca5041178165d3ff286c90cc99634f7d2ce.1452525860.git.lukas@wunner.de
drivers/gpu/drm/nouveau/nouveau_drm.c