[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1362439987.98158.YahooMailNeo@web171602.mail.ir2.yahoo.com>
Date: Mon, 4 Mar 2013 23:33:07 +0000 (GMT)
From: Hamed Abdelli <abdelli.hamed@...oo.fr>
To: "dwmw2@...radead.org" <dwmw2@...radead.org>
Cc: "trivial@...nel.org" <trivial@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86: fix the delay when controlling brightness using hotkeys on ideapad laptops
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@...oo.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))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists