diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2008-02-15 23:17:54 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-16 00:33:59 -0500 |
commit | d7c1d17dfed996e84212fc1ce617b2586dd70ec2 (patch) | |
tree | 0e98a00d767c2bc9342b5a7bc941d1d20f2b4a9d /drivers | |
parent | 7526696a013f33d4926fdc080c26fe6af07ba30f (diff) |
ACPI: thinkpad-acpi: make the video output feature optional
The video output port control feature is not very useful on many ThinkPads
(especially when a X server is running), and lately userspace is getting
better and better at it, so it makes sense to allow users to stripe out the
thinkpad-acpi video feature from their kernels and save at least 2KB.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/Kconfig | 17 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 20 |
2 files changed, 30 insertions, 7 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 1abc95ca9dfa..982e27b86d10 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -258,6 +258,23 @@ config THINKPAD_ACPI_BAY | |||
258 | 258 | ||
259 | If you are not sure, say Y here. | 259 | If you are not sure, say Y here. |
260 | 260 | ||
261 | config THINKPAD_ACPI_VIDEO | ||
262 | bool "Video output control support" | ||
263 | depends on THINKPAD_ACPI | ||
264 | default y | ||
265 | ---help--- | ||
266 | Allows the thinkpad_acpi driver to provide an interface to control | ||
267 | the various video output ports. | ||
268 | |||
269 | This feature often won't work well, depending on ThinkPad model, | ||
270 | display state, video output devices in use, whether there is a X | ||
271 | server running, phase of the moon, and the current mood of | ||
272 | Schroedinger's cat. If you can use X.org's RandR to control | ||
273 | your ThinkPad's video output ports instead of this feature, | ||
274 | don't think twice: do it and say N here to save some memory. | ||
275 | |||
276 | If you are not sure, say Y here. | ||
277 | |||
261 | config THINKPAD_ACPI_HOTKEY_POLL | 278 | config THINKPAD_ACPI_HOTKEY_POLL |
262 | bool "Suport NVRAM polling for hot keys" | 279 | bool "Suport NVRAM polling for hot keys" |
263 | depends on THINKPAD_ACPI | 280 | depends on THINKPAD_ACPI |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 02f946516584..4ea3866ddf90 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -301,6 +301,13 @@ TPACPI_HANDLE(hkey, ec, "\\_SB.HKEY", /* 600e/x, 770e, 770x */ | |||
301 | "HKEY", /* all others */ | 301 | "HKEY", /* all others */ |
302 | ); /* 570 */ | 302 | ); /* 570 */ |
303 | 303 | ||
304 | TPACPI_HANDLE(vid, root, "\\_SB.PCI.AGP.VGA", /* 570 */ | ||
305 | "\\_SB.PCI0.AGP0.VID0", /* 600e/x, 770x */ | ||
306 | "\\_SB.PCI0.VID0", /* 770e */ | ||
307 | "\\_SB.PCI0.VID", /* A21e, G4x, R50e, X30, X40 */ | ||
308 | "\\_SB.PCI0.AGP.VID", /* all others */ | ||
309 | ); /* R30, R31 */ | ||
310 | |||
304 | 311 | ||
305 | /************************************************************************* | 312 | /************************************************************************* |
306 | * ACPI helpers | 313 | * ACPI helpers |
@@ -2680,6 +2687,8 @@ static struct ibm_struct wan_driver_data = { | |||
2680 | * Video subdriver | 2687 | * Video subdriver |
2681 | */ | 2688 | */ |
2682 | 2689 | ||
2690 | #ifdef CONFIG_THINKPAD_ACPI_VIDEO | ||
2691 | |||
2683 | enum video_access_mode { | 2692 | enum video_access_mode { |
2684 | TPACPI_VIDEO_NONE = 0, | 2693 | TPACPI_VIDEO_NONE = 0, |
2685 | TPACPI_VIDEO_570, /* 570 */ | 2694 | TPACPI_VIDEO_570, /* 570 */ |
@@ -2707,13 +2716,6 @@ static int video_orig_autosw; | |||
2707 | static int video_autosw_get(void); | 2716 | static int video_autosw_get(void); |
2708 | static int video_autosw_set(int enable); | 2717 | static int video_autosw_set(int enable); |
2709 | 2718 | ||
2710 | TPACPI_HANDLE(vid, root, "\\_SB.PCI.AGP.VGA", /* 570 */ | ||
2711 | "\\_SB.PCI0.AGP0.VID0", /* 600e/x, 770x */ | ||
2712 | "\\_SB.PCI0.VID0", /* 770e */ | ||
2713 | "\\_SB.PCI0.VID", /* A21e, G4x, R50e, X30, X40 */ | ||
2714 | "\\_SB.PCI0.AGP.VID", /* all others */ | ||
2715 | ); /* R30, R31 */ | ||
2716 | |||
2717 | TPACPI_HANDLE(vid2, root, "\\_SB.PCI0.AGPB.VID"); /* G41 */ | 2719 | TPACPI_HANDLE(vid2, root, "\\_SB.PCI0.AGPB.VID"); /* G41 */ |
2718 | 2720 | ||
2719 | static int __init video_init(struct ibm_init_struct *iibm) | 2721 | static int __init video_init(struct ibm_init_struct *iibm) |
@@ -3023,6 +3025,8 @@ static struct ibm_struct video_driver_data = { | |||
3023 | .exit = video_exit, | 3025 | .exit = video_exit, |
3024 | }; | 3026 | }; |
3025 | 3027 | ||
3028 | #endif /* CONFIG_THINKPAD_ACPI_VIDEO */ | ||
3029 | |||
3026 | /************************************************************************* | 3030 | /************************************************************************* |
3027 | * Light (thinklight) subdriver | 3031 | * Light (thinklight) subdriver |
3028 | */ | 3032 | */ |
@@ -5807,10 +5811,12 @@ static struct ibm_init_struct ibms_init[] __initdata = { | |||
5807 | .init = wan_init, | 5811 | .init = wan_init, |
5808 | .data = &wan_driver_data, | 5812 | .data = &wan_driver_data, |
5809 | }, | 5813 | }, |
5814 | #ifdef CONFIG_THINKPAD_ACPI_VIDEO | ||
5810 | { | 5815 | { |
5811 | .init = video_init, | 5816 | .init = video_init, |
5812 | .data = &video_driver_data, | 5817 | .data = &video_driver_data, |
5813 | }, | 5818 | }, |
5819 | #endif | ||
5814 | { | 5820 | { |
5815 | .init = light_init, | 5821 | .init = light_init, |
5816 | .data = &light_driver_data, | 5822 | .data = &light_driver_data, |