diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2008-10-18 13:23:55 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-10-22 18:14:39 -0400 |
commit | d64c81c4cea0a14e88fc76e2c845e4885e491754 (patch) | |
tree | 027ce730772db3a6f7f0004397be408b9a64c3d9 | |
parent | 396293237cbc964fcedd4208cbc0d0f4880a98bb (diff) |
ACPI: thinkpad-acpi: Remove firmware backlight delays for Intel ACPI IGD OpRegion
Based on analysis and a patch from Matthew Garrett <mjg59@srcf.ucam.org>.
Instruct the ThinkPad ACPI firmware to remove delays on the processing of
backlight brightness changes. This method is present on ThinkPad
Vista-compatible BIOSes with standard ACPI backlight level control.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Yves-Alexis Perez <corsac@debian.org>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 4c47f9b80478..17b8281deee5 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -838,6 +838,13 @@ static int parse_strtoul(const char *buf, | |||
838 | return 0; | 838 | return 0; |
839 | } | 839 | } |
840 | 840 | ||
841 | static void tpacpi_disable_brightness_delay(void) | ||
842 | { | ||
843 | if (acpi_evalf(hkey_handle, NULL, "PWMS", "qvd", 0)) | ||
844 | printk(TPACPI_NOTICE | ||
845 | "ACPI backlight control delay disabled\n"); | ||
846 | } | ||
847 | |||
841 | static int __init tpacpi_query_bcl_levels(acpi_handle handle) | 848 | static int __init tpacpi_query_bcl_levels(acpi_handle handle) |
842 | { | 849 | { |
843 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 850 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
@@ -2139,6 +2146,8 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
2139 | if (!tp_features.hotkey) | 2146 | if (!tp_features.hotkey) |
2140 | return 1; | 2147 | return 1; |
2141 | 2148 | ||
2149 | tpacpi_disable_brightness_delay(); | ||
2150 | |||
2142 | hotkey_dev_attributes = create_attr_set(13, NULL); | 2151 | hotkey_dev_attributes = create_attr_set(13, NULL); |
2143 | if (!hotkey_dev_attributes) | 2152 | if (!hotkey_dev_attributes) |
2144 | return -ENOMEM; | 2153 | return -ENOMEM; |
@@ -2512,6 +2521,8 @@ static void hotkey_suspend(pm_message_t state) | |||
2512 | 2521 | ||
2513 | static void hotkey_resume(void) | 2522 | static void hotkey_resume(void) |
2514 | { | 2523 | { |
2524 | tpacpi_disable_brightness_delay(); | ||
2525 | |||
2515 | if (hotkey_mask_get()) | 2526 | if (hotkey_mask_get()) |
2516 | printk(TPACPI_ERR | 2527 | printk(TPACPI_ERR |
2517 | "error while trying to read hot key mask " | 2528 | "error while trying to read hot key mask " |