aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video_detect.c
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2010-12-06 02:04:21 -0500
committerLen Brown <len.brown@intel.com>2010-12-14 00:04:52 -0500
commit677bd810eedce61edf15452491781ff046b92edc (patch)
tree3ed50023d311d598a4928c79ae575f02248a185a /drivers/acpi/video_detect.c
parentcf7d7e5a1980d1116ee152d25dac382b112b9c17 (diff)
ACPI video: remove output switching control
Remove the ACPI video output switching control as it never works. With the patch applied, ACPI video driver still catches the video output notification, but it does nothing but raises the notification to userspace. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/video_detect.c')
-rw-r--r--drivers/acpi/video_detect.c57
1 files changed, 4 insertions, 53 deletions
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index b83676126598..42d3d72dae85 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -17,15 +17,14 @@
17 * capabilities the graphics cards plugged in support. The check for general 17 * capabilities the graphics cards plugged in support. The check for general
18 * video capabilities will be triggered by the first caller of 18 * video capabilities will be triggered by the first caller of
19 * acpi_video_get_capabilities(NULL); which will happen when the first 19 * acpi_video_get_capabilities(NULL); which will happen when the first
20 * backlight (or display output) switching supporting driver calls: 20 * backlight switching supporting driver calls:
21 * acpi_video_backlight_support(); 21 * acpi_video_backlight_support();
22 * 22 *
23 * Depending on whether ACPI graphics extensions (cmp. ACPI spec Appendix B) 23 * Depending on whether ACPI graphics extensions (cmp. ACPI spec Appendix B)
24 * are available, video.ko should be used to handle the device. 24 * are available, video.ko should be used to handle the device.
25 * 25 *
26 * Otherwise vendor specific drivers like thinkpad_acpi, asus_acpi, 26 * Otherwise vendor specific drivers like thinkpad_acpi, asus_acpi,
27 * sony_acpi,... can take care about backlight brightness and display output 27 * sony_acpi,... can take care about backlight brightness.
28 * switching.
29 * 28 *
30 * If CONFIG_ACPI_VIDEO is neither set as "compiled in" (y) nor as a module (m) 29 * If CONFIG_ACPI_VIDEO is neither set as "compiled in" (y) nor as a module (m)
31 * this file will not be compiled, acpi_video_get_capabilities() and 30 * this file will not be compiled, acpi_video_get_capabilities() and
@@ -83,11 +82,6 @@ long acpi_is_video_device(struct acpi_device *device)
83 if (!device) 82 if (!device)
84 return 0; 83 return 0;
85 84
86 /* Is this device able to support video switching ? */
87 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) ||
88 ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy)))
89 video_caps |= ACPI_VIDEO_OUTPUT_SWITCHING;
90
91 /* Is this device able to retrieve a video ROM ? */ 85 /* Is this device able to retrieve a video ROM ? */
92 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy))) 86 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy)))
93 video_caps |= ACPI_VIDEO_ROM_AVAILABLE; 87 video_caps |= ACPI_VIDEO_ROM_AVAILABLE;
@@ -161,8 +155,6 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
161 * 155 *
162 * if (dmi_name_in_vendors("XY")) { 156 * if (dmi_name_in_vendors("XY")) {
163 * acpi_video_support |= 157 * acpi_video_support |=
164 * ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR;
165 * acpi_video_support |=
166 * ACPI_VIDEO_BACKLIGHT_DMI_VENDOR; 158 * ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
167 *} 159 *}
168 */ 160 */
@@ -212,33 +204,8 @@ int acpi_video_backlight_support(void)
212EXPORT_SYMBOL(acpi_video_backlight_support); 204EXPORT_SYMBOL(acpi_video_backlight_support);
213 205
214/* 206/*
215 * Returns true if video.ko can do display output switching. 207 * Use acpi_backlight=vendor/video to force that backlight switching
216 * This does not work well/at all with binary graphics drivers 208 * is processed by vendor specific acpi drivers or video.ko driver.
217 * which disable system io ranges and do it on their own.
218 */
219int acpi_video_display_switch_support(void)
220{
221 if (!acpi_video_caps_checked)
222 acpi_video_get_capabilities(NULL);
223
224 if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR)
225 return 0;
226 else if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO)
227 return 1;
228
229 if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR)
230 return 0;
231 else if (acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VIDEO)
232 return 1;
233
234 return acpi_video_support & ACPI_VIDEO_OUTPUT_SWITCHING;
235}
236EXPORT_SYMBOL(acpi_video_display_switch_support);
237
238/*
239 * Use acpi_display_output=vendor/video or acpi_backlight=vendor/video
240 * To force that backlight or display output switching is processed by vendor
241 * specific acpi drivers or video.ko driver.
242 */ 209 */
243static int __init acpi_backlight(char *str) 210static int __init acpi_backlight(char *str)
244{ 211{
@@ -255,19 +222,3 @@ static int __init acpi_backlight(char *str)
255 return 1; 222 return 1;
256} 223}
257__setup("acpi_backlight=", acpi_backlight); 224__setup("acpi_backlight=", acpi_backlight);
258
259static int __init acpi_display_output(char *str)
260{
261 if (str == NULL || *str == '\0')
262 return 1;
263 else {
264 if (!strcmp("vendor", str))
265 acpi_video_support |=
266 ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VENDOR;
267 if (!strcmp("video", str))
268 acpi_video_support |=
269 ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO;
270 }
271 return 1;
272}
273__setup("acpi_display_output=", acpi_display_output);