* [PATCH] x86: fix the delay when controlling brightness using hotkeys on ideapad laptops
@ 2013-03-04 23:33 Hamed Abdelli
0 siblings, 0 replies; only message in thread
From: Hamed Abdelli @ 2013-03-04 23:33 UTC (permalink / raw)
To: dwmw2; +Cc: trivial, linux-kernel
Fixes the lag when reading and writing hotkeys for backlight control on ideapad laptops by minimizing the timeout.
Applies to linux-3.8.2
Thanks,
Signed-off-by: Hamed ABDELLI <abdelli.hamed@yahoo.fr>
--- linux-3.8.2/drivers/platform/x86/ideapad-laptop.c.orig 2013-03-04 23:38:09.291989270 +0100
+++ linux-3.8.2/drivers/platform/x86/ideapad-laptop.c 2013-03-04 23:38:47.272988333 +0100
@@ -90,7 +90,7 @@ MODULE_PARM_DESC(no_bt_rfkill, "No rfkil
/*
* ACPI Helpers
*/
-#define IDEAPAD_EC_TIMEOUT (100) /* in ms */
+#define IDEAPAD_EC_TIMEOUT (1) /* in ms */
static int read_method_int(acpi_handle handle, const char *method, int *val)
{
@@ -157,7 +157,7 @@ static int read_ec_data(acpi_handle hand
if (method_vpcw(handle, 1, cmd))
return -1;
- for (end_jiffies = jiffies+(HZ)*IDEAPAD_EC_TIMEOUT/1000+1;
+ for (end_jiffies = jiffies+(HZ)*IDEAPAD_EC_TIMEOUT/10000+1;
time_before(jiffies, end_jiffies);) {
schedule();
if (method_vpcr(handle, 1, &val))
@@ -183,7 +183,7 @@ static int write_ec_cmd(acpi_handle hand
if (method_vpcw(handle, 1, cmd))
return -1;
- for (end_jiffies = jiffies+(HZ)*IDEAPAD_EC_TIMEOUT/1000+1;
+ for (end_jiffies = jiffies+(HZ)*IDEAPAD_EC_TIMEOUT/10000+1;
time_before(jiffies, end_jiffies);) {
schedule();
if (method_vpcr(handle, 1, &val))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-04 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-04 23:33 [PATCH] x86: fix the delay when controlling brightness using hotkeys on ideapad laptops Hamed Abdelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®