aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2016-01-11 14:09:20 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-02-09 05:21:07 -0500
commit156d7d4120e1c860fde667fc30eeae84bc3e7a25 (patch)
tree67e4e96bc3729d14b2dd72d704149be3eb141a95 /drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
parente87a52b38943608531ff63ea397b1ae5dd48e341 (diff)
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/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
index 3c895863fcf5..fa948dcbdd5d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
@@ -552,13 +552,14 @@ static bool amdgpu_atpx_detect(void)
552void amdgpu_register_atpx_handler(void) 552void amdgpu_register_atpx_handler(void)
553{ 553{
554 bool r; 554 bool r;
555 enum vga_switcheroo_handler_flags_t handler_flags = 0;
555 556
556 /* detect if we have any ATPX + 2 VGA in the system */ 557 /* detect if we have any ATPX + 2 VGA in the system */
557 r = amdgpu_atpx_detect(); 558 r = amdgpu_atpx_detect();
558 if (!r) 559 if (!r)
559 return; 560 return;
560 561
561 vga_switcheroo_register_handler(&amdgpu_atpx_handler); 562 vga_switcheroo_register_handler(&amdgpu_atpx_handler, handler_flags);
562} 563}
563 564
564/** 565/**