]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Thomas Renninger <trenn@suse.de> |
2 | Subject: Do not use video backlight switching for Lenovo ThinkPads | |
3 | Patch-Mainline: never | |
4 | ||
5 | Mainline will go the IGD driver way which is too new and untested for | |
6 | SLE11. | |
7 | ||
8 | --- | |
9 | drivers/acpi/video.c | 17 ++++++++++++++--- | |
10 | drivers/acpi/video_detect.c | 2 +- | |
11 | 2 files changed, 15 insertions(+), 4 deletions(-) | |
12 | ||
13 | --- a/drivers/acpi/video.c | |
14 | +++ b/drivers/acpi/video.c | |
15 | @@ -731,7 +731,7 @@ static void acpi_video_device_find_cap(s | |
16 | { | |
17 | acpi_handle h_dummy1; | |
18 | u32 max_level = 0; | |
19 | - | |
20 | + unsigned long acpi_video_support; | |
21 | ||
22 | memset(&device->cap, 0, sizeof(device->cap)); | |
23 | ||
24 | @@ -759,8 +759,19 @@ static void acpi_video_device_find_cap(s | |
25 | device->cap._DSS = 1; | |
26 | } | |
27 | ||
28 | - if (acpi_video_backlight_support()) | |
29 | - max_level = acpi_video_init_brightness(device); | |
30 | + acpi_video_support = acpi_video_backlight_support(); | |
31 | + if (acpi_video_support) { | |
32 | + /* | |
33 | + * Ugly SLE11 hack to let thinkpad_acpi handle brightness on | |
34 | + * ThinkPad IGD devices | |
35 | + */ | |
36 | + if (dmi_name_in_vendors("LENOVO") && | |
37 | + (acpi_video_support & ACPI_VIDEO_IGD)) | |
38 | + brightness_switch_enabled = 0; | |
39 | + else | |
40 | + max_level = acpi_video_init_brightness(device); | |
41 | + } else | |
42 | + brightness_switch_enabled = 0; | |
43 | ||
44 | if (device->cap._BCL && device->cap._BCM && max_level > 0) { | |
45 | int result; | |
46 | --- a/drivers/acpi/video_detect.c | |
47 | +++ b/drivers/acpi/video_detect.c | |
48 | @@ -217,7 +217,7 @@ int acpi_video_backlight_support(void) | |
49 | return 1; | |
50 | ||
51 | /* Then go the default way */ | |
52 | - return acpi_video_support & ACPI_VIDEO_BACKLIGHT; | |
53 | + return acpi_video_support & (ACPI_VIDEO_BACKLIGHT | ACPI_VIDEO_IGD); | |
54 | } | |
55 | EXPORT_SYMBOL(acpi_video_backlight_support); | |
56 |