summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/apple-gmux.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2016-01-11 20:09:20 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-02-09 11:21:07 +0100
commit156d7d4120e1c860fde667fc30eeae84bc3e7a25 (patch)
tree67e4e96bc3729d14b2dd72d704149be3eb141a95 /drivers/platform/x86/apple-gmux.c
parente87a52b38943608531ff63ea397b1ae5dd48e341 (diff)
downloadlinux-stable-156d7d4120e1c860fde667fc30eeae84bc3e7a25.tar.gz
linux-stable-156d7d4120e1c860fde667fc30eeae84bc3e7a25.tar.bz2
linux-stable-156d7d4120e1c860fde667fc30eeae84bc3e7a25.zip
vga_switcheroo: Add handler flags infrastructure
Allow handlers to declare their capabilities and allow clients to obtain that information. So far we have these use cases: * If the handler is able to switch DDC separately, clients need to probe EDID with drm_get_edid_switcheroo(). We should allow them to detect a capable handler to ensure this function only gets called when needed. * Likewise if the handler is unable to switch AUX separately, the active client needs to communicate link training parameters to the inactive client, which may then skip the AUX handshake and set up its output with these pre-calibrated values (DisplayPort specification v1.1a, section 2.5.3.3). Clients need a way to recognize such a situation. The flags for the radeon_atpx_handler and amdgpu_atpx_handler are initially set to 0, this can later on be amended with handler_flags |= VGA_SWITCHEROO_CAN_SWITCH_DDC; when a ->switch_ddc callback is added. 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> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/2b0d93ed6e511ca09e95e45e0b35627f330fabce.1452525860.git.lukas@wunner.de
Diffstat (limited to 'drivers/platform/x86/apple-gmux.c')
-rw-r--r--drivers/platform/x86/apple-gmux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index f236250ac106..c401d4936b65 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -705,7 +705,7 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
init_completion(&gmux_data->powerchange_done);
gmux_enable_interrupts(gmux_data);
- if (vga_switcheroo_register_handler(&gmux_handler)) {
+ if (vga_switcheroo_register_handler(&gmux_handler, 0)) {
ret = -ENODEV;
goto err_register_handler;
}