Input: properly queue synthetic events
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 20 Jul 2022 18:10:47 +0000 (11:10 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 20 Jul 2022 18:35:11 +0000 (11:35 -0700)
commit59b7a5af8e8c22b20fc68eca48d7cfdc92501c1e
treeefaac5365e93474ae04330d72ef31f61e6971277
parent39636805cab2d46aa645f389f3fca8040afd4c4f
Input: properly queue synthetic events

We should not be passing synthetic events (such as autorepeat events)
out of order with the events coming from the hardware device, but rather
add them to pending events and flush them all at once.

This also fixes an issue with timestamps for key release events carrying
stale data from the previous autorepeat event.

Reviewed-by: Angela Czubak <acz@semihalf.com>
Link: https://lore.kernel.org/r/YszNfq4b6MkeoCJC@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/input.c