aboutsummaryrefslogtreecommitdiff
path: root/drivers/ddr/altera/sequencer.c
diff options
context:
space:
mode:
authorThomas Watson <twatson52@icloud.com>2022-02-10 15:13:14 -0600
committerMarek Vasut <marex@denx.de>2022-02-11 00:03:48 +0100
commit96991e652f541323a03c5b7e075d54a117091618 (patch)
tree27c4e7f1a858af09f8d85d3669fca72175a9e632 /drivers/ddr/altera/sequencer.c
parent078dfef931523b64c1904517a1a6f04511fe42a2 (diff)
console: usb: kbd: Limit poll frequency to improve performance
Using the XHCI driver, the function `usb_kbd_poll_for_event` takes 30-40ms to run. The exact time is dependent on the polling interval the keyboard requests in its descriptor, and likely cannot be significantly reduced without major rework to the XHCI driver. The U-Boot EFI console service sets a timer to poll the keyboard every 5 microseconds, and this timer is checked every time a block is read off disk. The net effect is that, on my system, loading a ~40MiB kernel and initrd takes about 62 seconds with a slower keyboard and 53 seconds with a faster one, with the vast majority of the time spent polling the keyboard. To solve this problem, this patch adds a 20ms delay between consecutive calls to `usb_kbd_poll_for_event`. This is sufficient to reduce the total loading time to under half a second for both keyboards, and does not impact the perceived keystroke latency. Signed-off-by: Thomas Watson <twatson52@icloud.com>
Diffstat (limited to 'drivers/ddr/altera/sequencer.c')
0 files changed, 0 insertions, 0 deletions