]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.arch/acpi_video_thinkpad_exclude_IGD_devices.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / acpi_video_thinkpad_exclude_IGD_devices.patch
diff --git a/src/patches/suse-2.6.27.31/patches.arch/acpi_video_thinkpad_exclude_IGD_devices.patch b/src/patches/suse-2.6.27.31/patches.arch/acpi_video_thinkpad_exclude_IGD_devices.patch
new file mode 100644 (file)
index 0000000..1a051f3
--- /dev/null
@@ -0,0 +1,56 @@
+From: Thomas Renninger <trenn@suse.de>
+Subject: Do not use video backlight switching for Lenovo ThinkPads
+Patch-Mainline: never
+
+Mainline will go the IGD driver way which is too new and untested for
+SLE11.
+
+---
+ drivers/acpi/video.c        |   17 ++++++++++++++---
+ drivers/acpi/video_detect.c |    2 +-
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+--- a/drivers/acpi/video.c
++++ b/drivers/acpi/video.c
+@@ -731,7 +731,7 @@ static void acpi_video_device_find_cap(s
+ {
+       acpi_handle h_dummy1;
+       u32 max_level = 0;
+-
++      unsigned long acpi_video_support;
+       memset(&device->cap, 0, sizeof(device->cap));
+@@ -759,8 +759,19 @@ static void acpi_video_device_find_cap(s
+               device->cap._DSS = 1;
+       }
+-      if (acpi_video_backlight_support())
+-              max_level = acpi_video_init_brightness(device);
++      acpi_video_support = acpi_video_backlight_support();
++      if (acpi_video_support) {
++              /*
++               * Ugly SLE11 hack to let thinkpad_acpi handle brightness on
++               * ThinkPad IGD devices
++               */
++              if (dmi_name_in_vendors("LENOVO") &&
++                  (acpi_video_support & ACPI_VIDEO_IGD))
++                      brightness_switch_enabled = 0;
++              else
++                      max_level = acpi_video_init_brightness(device);
++      } else
++                brightness_switch_enabled = 0;
+       if (device->cap._BCL && device->cap._BCM && max_level > 0) {
+               int result;
+--- a/drivers/acpi/video_detect.c
++++ b/drivers/acpi/video_detect.c
+@@ -217,7 +217,7 @@ int acpi_video_backlight_support(void)
+               return 1;
+       /* Then go the default way */
+-      return acpi_video_support & ACPI_VIDEO_BACKLIGHT;
++      return acpi_video_support & (ACPI_VIDEO_BACKLIGHT | ACPI_VIDEO_IGD);
+ }
+ EXPORT_SYMBOL(acpi_video_backlight_support);