aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video_detect.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/video_detect.c')
-rw-r--r--drivers/acpi/video_detect.c52
1 files changed, 4 insertions, 48 deletions
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index b83676126598..5af3479714f6 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
@@ -161,8 +160,6 @@ long acpi_video_get_capabilities(acpi_handle graphics_handle)
161 * 160 *
162 * if (dmi_name_in_vendors("XY")) { 161 * if (dmi_name_in_vendors("XY")) {
163 * acpi_video_support |= 162 * acpi_video_support |=
164 * ACPI_VIDEO_OUTPUT_SWITCHING_DMI_VENDOR;
165 * acpi_video_support |=
166 * ACPI_VIDEO_BACKLIGHT_DMI_VENDOR; 163 * ACPI_VIDEO_BACKLIGHT_DMI_VENDOR;
167 *} 164 *}
168 */ 165 */
@@ -212,33 +209,8 @@ int acpi_video_backlight_support(void)
212EXPORT_SYMBOL(acpi_video_backlight_support); 209EXPORT_SYMBOL(acpi_video_backlight_support);
213 210
214/* 211/*
215 * Returns true if video.ko can do display output switching. 212 * Use acpi_backlight=vendor/video to force that backlight switching
216 * This does not work well/at all with binary graphics drivers 213 * 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 */ 214 */
243static int __init acpi_backlight(char *str) 215static int __init acpi_backlight(char *str)
244{ 216{
@@ -255,19 +227,3 @@ static int __init acpi_backlight(char *str)
255 return 1; 227 return 1;
256} 228}
257__setup("acpi_backlight=", acpi_backlight); 229__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);