Add missing patch that touched many files, including thinkpad-acpi and
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / releases / upstream / 2.6.28-rc1 / 0005-ACPI-thinkpad-acpi-Remove-firmware-backlight-delay.patch
blobfae18c29e160684abde4d8929be8b26c70613c6e
1 From d64c81c4cea0a14e88fc76e2c845e4885e491754 Mon Sep 17 00:00:00 2001
2 From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
3 Date: Sat, 18 Oct 2008 14:23:55 -0300
4 Subject: ACPI: thinkpad-acpi: Remove firmware backlight delays for Intel ACPI IGD OpRegion
6 Based on analysis and a patch from Matthew Garrett <mjg59@srcf.ucam.org>.
8 Instruct the ThinkPad ACPI firmware to remove delays on the processing of
9 backlight brightness changes. This method is present on ThinkPad
10 Vista-compatible BIOSes with standard ACPI backlight level control.
12 Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
13 Cc: Matthew Garrett <mjg59@srcf.ucam.org>
14 Cc: Yves-Alexis Perez <corsac@debian.org>
15 Signed-off-by: Len Brown <len.brown@intel.com>
16 ---
17 drivers/misc/thinkpad_acpi.c | 11 +++++++++++
18 1 files changed, 11 insertions(+), 0 deletions(-)
20 diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
21 index 4c47f9b..17b8281 100644
22 --- a/drivers/misc/thinkpad_acpi.c
23 +++ b/drivers/misc/thinkpad_acpi.c
24 @@ -838,6 +838,13 @@ static int parse_strtoul(const char *buf,
25 return 0;
28 +static void tpacpi_disable_brightness_delay(void)
30 + if (acpi_evalf(hkey_handle, NULL, "PWMS", "qvd", 0))
31 + printk(TPACPI_NOTICE
32 + "ACPI backlight control delay disabled\n");
35 static int __init tpacpi_query_bcl_levels(acpi_handle handle)
37 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
38 @@ -2139,6 +2146,8 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
39 if (!tp_features.hotkey)
40 return 1;
42 + tpacpi_disable_brightness_delay();
44 hotkey_dev_attributes = create_attr_set(13, NULL);
45 if (!hotkey_dev_attributes)
46 return -ENOMEM;
47 @@ -2512,6 +2521,8 @@ static void hotkey_suspend(pm_message_t state)
49 static void hotkey_resume(void)
51 + tpacpi_disable_brightness_delay();
53 if (hotkey_mask_get())
54 printk(TPACPI_ERR
55 "error while trying to read hot key mask "
56 --
57 1.5.6.5