Skip to content

Commit

Permalink
ACPI: thinkpad-acpi: Remove firmware backlight delays for Intel ACPI …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Henrique de Moraes Holschuh authored and Len Brown committed Oct 22, 2008
1 parent 3962932 commit d64c81c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,13 @@ static int parse_strtoul(const char *buf,
return 0;
}

static void tpacpi_disable_brightness_delay(void)
{
if (acpi_evalf(hkey_handle, NULL, "PWMS", "qvd", 0))
printk(TPACPI_NOTICE
"ACPI backlight control delay disabled\n");
}

static int __init tpacpi_query_bcl_levels(acpi_handle handle)
{
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
Expand Down Expand Up @@ -2139,6 +2146,8 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
if (!tp_features.hotkey)
return 1;

tpacpi_disable_brightness_delay();

hotkey_dev_attributes = create_attr_set(13, NULL);
if (!hotkey_dev_attributes)
return -ENOMEM;
Expand Down Expand Up @@ -2512,6 +2521,8 @@ static void hotkey_suspend(pm_message_t state)

static void hotkey_resume(void)
{
tpacpi_disable_brightness_delay();

if (hotkey_mask_get())
printk(TPACPI_ERR
"error while trying to read hot key mask "
Expand Down

0 comments on commit d64c81c

Please sign in to comment.