Dave Airlie
6a9ee8af34
vga_switcheroo: initial implementation (v15)
...
Many new laptops now come with 2 gpus, one to be used for low power
modes and one for gaming/on-ac applications. These GPUs are typically
wired to the laptop panel and VGA ports via a multiplexer unit which
is controlled via ACPI methods.
4 combinations of systems typically exist - with 2 ACPI methods.
Intel/ATI - Lenovo W500/T500 - use ATPX ACPI method
ATI/ATI - some ASUS - use ATPX ACPI Method
Intel/Nvidia - - use _DSM ACPI method
Nvidia/Nvidia - - use _DSM ACPI method.
TODO:
This patch adds support for the ATPX method and initial bits
for the _DSM methods that need to written by someone with
access to the hardware.
Add a proper non-debugfs interface - need to get some proper
testing first.
v2: add power up/down support for both devices
on W500 puts i915/radeon into D3 and cuts power to radeon.
v3: redo probing methods, no DMI list, drm devices call to
register with switcheroo, it tries to find an ATPX method on
any device and once there is two devices + ATPX it inits the
switcher.
v4: ATPX msg handling using buffers - should work on more machines
v5: rearchitect after more mjg59 discussion - move ATPX handling to
radeon driver.
v6: add file headers + initial nouveau bits (to be filled out).
v7: merge delayed switcher code.
v8: avoid suspend/resume of gpu that is off
v9: rearchitect - mjg59 is always right. - move all ATPX code to
radeon, should allow simpler DSM also proper ATRM handling
v10: add ATRM support for radeon BIOS, add mutex to lock vgasr_priv
v11: fix bug in resuming Intel for 2nd time.
v12: start fixing up nvidia code blindly.
v13: blindly guess at finishing nvidia code
v14: remove radeon audio hacks - fix up intel resume more like upstream
v15: clean up printks + remove unnecessary igd/dis pointers
mount debugfs
/sys/kernel/debug/vgaswitcheroo/switch - should exist if ATPX detected
+ 2 cards.
DIS - immediate change to discrete
IGD - immediate change to IGD
DDIS - delayed change to discrete
DIGD - delayed change to IGD
ON - turn on not in use
OFF - turn off not in use
Tested on W500 (Intel/ATI) and T500 (Intel/ATI)
Signed-off-by: Dave Airlie <airlied@redhat.com >
2010-03-01 16:20:37 +10:00
..
2010-02-20 14:10:48 +00:00
2009-12-13 19:47:42 -08:00
2010-01-11 09:34:04 -08:00
2010-01-11 09:34:07 -08:00
2009-12-09 19:52:01 -08:00
2010-01-18 12:30:27 +01:00
2009-11-12 11:19:44 -08:00
2009-11-18 22:19:03 -08:00
2010-01-13 09:04:53 +00:00
2009-12-03 13:23:12 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-12-15 15:01:46 -05:00
2009-12-14 12:49:47 +11:00
2009-12-17 10:27:27 +00:00
2010-01-29 11:15:32 -08:00
2009-12-16 10:47:44 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-12-23 08:53:31 -08:00
2010-01-06 16:18:15 -05:00
2009-12-16 07:20:13 -08:00
2010-02-04 01:01:32 -05:00
2009-12-15 08:53:35 -08:00
2009-12-16 11:33:46 +00:00
2010-01-29 08:22:01 -08:00
2009-11-26 09:16:19 +01:00
2009-12-16 07:20:18 -08:00
2010-02-23 08:40:43 +01:00
2009-11-10 12:31:43 +01:00
2009-11-02 23:39:15 -08:00
2009-11-24 15:06:47 +11:00
2009-12-04 23:41:47 +01:00
2009-12-03 19:28:51 +01:00
2009-12-04 15:39:55 +01:00
2009-11-13 20:46:24 +01:00
2009-12-08 19:28:09 -08:00
2009-11-08 20:57:03 -08:00
2009-12-05 15:32:03 -08:00
2009-11-02 15:47:54 +01:00
2010-02-05 07:35:05 -08:00
2010-02-02 15:58:48 -08:00
2009-12-09 17:09:36 +11:00
2009-11-24 13:33:34 -05:00
2009-12-06 21:10:56 +01:00
2009-12-02 22:07:23 -08:00
2009-12-15 08:53:28 -08:00
2009-12-15 08:53:32 -08:00
2009-12-10 23:52:27 +00:00
2009-12-23 11:23:43 -08:00
2009-12-10 23:52:01 +00:00
2009-12-10 23:52:22 +00:00
2009-11-09 09:40:57 +01:00
2009-12-10 23:52:05 +00:00
2009-12-10 23:43:19 -07:00
2009-12-08 19:26:55 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 15:20:57 +01:00
2010-01-12 10:02:46 +01:00
2010-01-12 10:14:42 +01:00
2009-12-15 08:53:25 -08:00
2009-12-15 08:53:33 -08:00
2009-12-18 17:43:32 +01:00
2009-12-10 08:54:14 -06:00
2009-12-15 08:53:27 -08:00
2009-11-04 09:50:58 -08:00
2009-12-03 13:18:04 -08:00
2010-01-25 12:26:38 -02:00
2009-12-10 15:02:51 +01:00
2009-11-11 15:22:49 +01:00
2009-12-23 13:44:12 +01:00
2009-12-10 15:02:53 +01:00
2009-12-23 13:33:54 +01:00
2010-03-01 16:20:37 +10:00
2009-12-03 12:14:36 -08:00
2009-12-17 20:55:57 -08:00
2009-12-16 12:16:42 -05:00
2009-11-04 09:50:58 -08:00
2010-01-26 20:54:50 +01:00
2009-12-29 19:58:16 +01:00
2009-12-11 11:24:52 -08:00
2009-12-17 10:58:17 -05:00
2010-02-19 10:41:13 -05:00
2009-11-19 18:12:05 +00:00
2009-11-19 18:11:35 +00:00
2009-11-24 17:00:27 +11:00
2009-12-13 18:37:28 +01:00
2009-11-04 09:50:58 -08:00
2009-12-16 12:16:49 -05:00
2010-01-11 14:32:44 +01:00
2009-12-03 11:58:47 +00:00
2009-12-08 20:30:41 -08:00
2009-12-16 07:20:01 -08:00
2009-11-05 14:08:03 +01:00
2010-01-11 09:34:03 -08:00
2009-12-14 23:55:34 +01:00
2009-12-15 08:53:12 -08:00
2010-02-04 01:07:12 +01:00
2009-12-01 14:47:32 +08:00
2009-11-20 00:25:42 +00:00
2009-12-14 21:17:29 +01:00
2009-12-11 23:55:42 -08:00
2009-11-17 10:16:32 -05:00
2009-12-02 21:58:33 -08:00
2009-12-21 11:32:27 -05:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-12-08 20:42:28 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-26 15:53:10 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-11-26 16:00:36 -08:00
2009-11-19 11:08:54 -05:00
2009-11-04 09:50:58 -08:00
2010-02-07 03:06:22 -05:00
2009-12-09 19:43:33 -08:00
2009-11-04 09:50:58 -08:00
2009-12-25 17:30:22 -08:00
2009-12-17 13:23:24 -08:00
2009-12-15 20:42:06 +01:00
2009-11-20 00:52:09 -08:00
2010-02-18 02:08:16 -08:00
2009-11-04 14:22:21 +01:00
2010-01-11 14:29:20 +01:00
2009-12-16 07:20:18 -08:00
2009-12-16 07:20:17 -08:00
2009-11-04 09:50:58 -08:00
2009-12-16 07:20:10 -08:00
2009-12-14 23:55:33 +01:00
2009-11-15 22:23:47 -08:00
2009-12-11 15:18:07 -08:00
2009-12-23 06:52:08 -05:00
2009-11-26 12:59:20 +01:00
2009-12-15 08:53:26 -08:00
2009-12-12 13:08:15 +01:00
2009-12-16 12:19:59 +01:00
2010-01-16 12:15:39 -08:00
2009-12-16 07:20:13 -08:00
2010-02-16 15:11:08 -08:00
2010-01-07 11:58:37 -06:00
2010-01-11 09:34:04 -08:00
2009-12-31 19:45:04 +00:00
2009-12-16 06:56:12 -08:00
2009-12-03 09:32:17 +02:00
2009-12-09 17:14:38 +11:00
2009-12-17 11:41:51 +00:00
2009-12-17 11:33:33 +00:00
2009-12-17 11:27:09 +00:00
2010-01-12 14:34:14 -05:00
2009-12-15 08:53:36 -08:00
2010-01-12 21:02:00 -08:00
2009-12-12 22:24:32 -07:00
2009-11-10 09:33:46 +11:00
2009-12-16 12:36:49 -08:00
2009-12-15 08:53:20 -08:00
2009-12-18 14:53:36 +11:00
2009-12-15 08:53:12 -08:00
2009-12-15 08:53:20 -08:00
2010-01-16 12:15:40 -08:00
2010-01-16 12:15:40 -08:00
2009-12-12 13:08:15 +01:00
2009-12-12 13:08:14 +01:00
2009-12-17 12:51:05 -08:00
2009-12-15 16:28:26 +10:30
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-12-22 12:27:34 -05:00
2009-11-04 09:50:58 -08:00
2009-12-05 15:22:26 -08:00
2009-12-03 15:59:22 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-12-05 16:08:40 -05:00
2009-12-04 15:55:38 -05:00
2009-12-16 10:43:34 -08:00
2009-12-14 18:12:08 -05:00
2009-11-20 10:05:52 +09:00
2009-11-28 15:05:05 -05:00
2009-11-06 14:32:24 +03:00
2009-12-15 08:53:13 -08:00
2009-12-15 08:53:13 -08:00
2009-12-01 16:15:50 -08:00
2009-12-15 08:53:12 -08:00
2009-12-09 12:12:44 +02:00
2009-12-16 07:19:57 -08:00
2009-12-16 07:20:07 -08:00
2009-12-17 07:23:42 -08:00
2010-01-27 09:20:03 -08:00
2009-12-12 14:27:24 -08:00
2009-11-04 13:06:36 -08:00
2010-01-29 16:51:10 +11:00
2009-12-04 15:56:19 -08:00
2009-12-08 10:02:12 +09:00
2010-02-04 01:07:12 +01:00
2010-01-19 01:59:02 -08:00
2009-11-04 09:50:58 -08:00
2009-11-04 09:50:58 -08:00
2009-12-04 15:39:55 +01:00
2009-12-11 11:24:55 -08:00
2009-12-14 23:55:33 +01:00
2009-12-06 16:17:57 +01:00
2009-12-15 08:53:25 -08:00
2009-12-15 17:35:26 -05:00
2010-01-11 09:45:37 -08:00
2009-12-03 11:43:23 +00:00
2009-12-02 09:55:33 +01:00
2009-12-16 07:20:08 -08:00
2009-12-17 11:46:01 +00:00
2009-12-23 13:33:54 +01:00
2009-11-10 22:26:29 -08:00
2009-11-22 18:58:16 +01:00
2009-12-17 09:46:44 +01:00
2009-12-17 09:46:44 +01:00
2009-10-30 15:06:37 -07:00
2010-01-02 11:17:05 -08:00
2010-01-04 11:33:58 +01:00
2009-11-18 17:09:26 -05:00
2009-12-15 08:53:20 -08:00
2009-11-04 09:50:58 -08:00
2009-12-14 23:55:33 +01:00
2009-12-15 20:56:42 -08:00
2009-12-14 23:55:33 +01:00
2009-12-14 23:55:32 +01:00
2009-12-14 23:55:33 +01:00
2009-12-15 08:53:26 -08:00
2010-02-04 16:07:41 -08:00
2009-11-13 14:23:11 -08:00
2009-11-23 15:53:52 -05:00
2009-10-30 08:27:25 +11:00
2009-12-17 09:25:19 +11:00
2009-12-16 07:20:10 -08:00
2009-11-04 08:44:54 -08:00
2009-12-04 15:39:55 +01:00
2010-01-06 00:14:32 -08:00
2009-11-02 15:43:20 +09:00
2009-11-30 12:02:53 +09:00
2009-12-16 12:16:49 -05:00
2009-12-02 19:57:15 -08:00
2009-12-11 09:17:02 +01:00
2009-12-01 08:20:31 -08:00
2009-12-11 09:17:02 +01:00
2009-12-16 07:20:04 -08:00
2009-11-18 14:52:25 +01:00
2009-12-16 22:32:29 -05:00
2009-12-14 23:55:33 +01:00
2009-12-14 23:55:33 +01:00
2009-12-14 23:55:32 +01:00
2009-12-14 23:55:32 +01:00
2009-12-14 23:55:32 +01:00
2009-12-14 23:55:33 +01:00
2010-01-14 22:38:09 -05:00
2009-11-17 17:40:33 -08:00
2009-12-15 08:53:16 -08:00
2009-11-15 09:03:10 +01:00
2009-12-30 10:27:04 -05:00
2009-12-25 17:30:22 -08:00
2009-12-23 11:23:43 -08:00
2009-12-02 22:07:25 -08:00
2009-11-13 20:46:24 +01:00
2009-12-16 07:20:00 -08:00
2009-11-13 20:46:24 +01:00
2009-12-08 19:30:19 -08:00
2010-01-21 13:39:03 +01:00
2009-12-09 14:05:49 -05:00
2009-12-16 07:20:08 -08:00
2009-11-26 09:04:55 +01:00
2010-01-16 12:15:38 -08:00
2010-01-07 11:58:36 -06:00
2009-11-20 00:52:05 -08:00
2009-11-10 20:54:38 -08:00
2009-12-11 11:55:26 -08:00
2010-01-20 15:24:35 -08:00
2009-12-10 22:55:37 +01:00
2009-11-29 22:03:04 +01:00
2009-12-12 13:08:15 +01:00
2010-03-01 16:20:37 +10:00
2009-12-16 09:27:16 -02:00
2009-12-15 08:53:16 -08:00
2009-11-13 15:54:27 -08:00
2009-12-17 15:45:30 -08:00
2009-11-16 01:09:48 +09:00
2009-12-23 07:57:07 -05:00
2009-11-18 23:30:41 -08:00
2009-12-16 12:16:49 -05:00
2009-11-25 15:48:37 -08:00