mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
hid: Reduce default mouse polling interval to 60Hz
Reduces overhead when using X
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
* Module parameters.
|
* Module parameters.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static unsigned int hid_mousepoll_interval;
|
static unsigned int hid_mousepoll_interval = ~0;
|
||||||
module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
|
module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
|
||||||
MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
|
MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
|
||||||
|
|
||||||
@@ -1083,8 +1083,12 @@ static int usbhid_start(struct hid_device *hid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Change the polling interval of mice. */
|
/* Change the polling interval of mice. */
|
||||||
if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0)
|
if (hid->collection->usage == HID_GD_MOUSE) {
|
||||||
|
if (hid_mousepoll_interval == ~0 && interval < 16)
|
||||||
|
interval = 16;
|
||||||
|
else if (hid_mousepoll_interval != ~0 && hid_mousepoll_interval != 0)
|
||||||
interval = hid_mousepoll_interval;
|
interval = hid_mousepoll_interval;
|
||||||
|
}
|
||||||
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
if (usb_endpoint_dir_in(endpoint)) {
|
if (usb_endpoint_dir_in(endpoint)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user