lkml.org 
[lkml]   [2003]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] PS/2 mouse rate setting

My KVM doesn't like the new default of psmouse_rate=200. The mouse
felt very "jumpy" and was unconvenient to use.

Unfortunately the setting could be only changed when the mouse driver
was a module. But I tend to have the mouse driver compiled in.
This patch fixes this by adding an __setup for it too.

Also it fixes an off by one bug to make sure that psmouse_rate=60
really gives 60 samples per second and not 40.

Overall as KVM user I must say I'm not very happy with the 2.6 mouse
driver. 2.4 pretty much worked out of the box, but 2.6 needs
lots of strange options (psmouse_noext, psmouse_rate=80)
because it does things very differently out of the box.

-Andi

diff -u linux-2.6.0test9-averell/drivers/input/mouse/psmouse-base.c-o linux-2.6.0test9-averell/drivers/input/mouse/psmouse-base.c
--- linux-2.6.0test9-averell/drivers/input/mouse/psmouse-base.c-o 2003-09-28 10:53:17.000000000 +0200
+++ linux-2.6.0test9-averell/drivers/input/mouse/psmouse-base.c 2003-10-27 14:54:02.000000000 +0100
@@ -454,7 +454,7 @@
unsigned char rates[] = { 200, 100, 80, 60, 40, 20, 10, 0 };
int i = 0;

- while (rates[i] > psmouse_rate) i++;
+ while (rates[i] >= psmouse_rate) i++;
psmouse_command(psmouse, rates + i, PSMOUSE_CMD_SETRATE);
}

@@ -651,10 +651,17 @@
return 1;
}

+static int __init psmouse_rate_setup(char *str)
+{
+ get_option(&str, &psmouse_rate);
+ return 1;
+}
+
__setup("psmouse_noext", psmouse_noext_setup);
__setup("psmouse_resolution=", psmouse_resolution_setup);
__setup("psmouse_smartscroll=", psmouse_smartscroll_setup);
__setup("psmouse_resetafter=", psmouse_resetafter_setup);
+__setup("psmouse_rate=", psmouse_rate_setup);

#endif




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.172 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site