linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input <linux-input@vger.kernel.org>
Subject: Is delayed work's precision good enough for input-poller?
Date: Thu, 12 Nov 2020 16:30:49 +0100	[thread overview]
Message-ID: <e1d48a94a9f080534d4940048081d5ecdc64d4e9.camel@suse.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

Hi everyone,
I just found about an issue in the downstream Raspberry Pi[1] kernel that I
wonder if it'd be worth fixing generally. The official RPi DSI display
touchscreen uses the polled input interface. The ts chip works at around 60Hz,
and that's the period the driver is configured to use (17ms). This doesn't play
too good on systems with low HZ (100/250). Users complain that in practice they
experience, at worst, half the event rate. This is due to the rounding error
when converting milliseconds to jiffies, general system delays, and what not.

We could somewhat fix this in the driver (raspberrypi-ts.c) by playing with the
poll rate. But it seems pretty hacky and would ultimately stress the CPU
unnecessarily. I wonder to what extent it makes sense to move the
implementation to using hrtimers whenever the poll period is in the same order
of magnitude as HZ's delta.

Any ideas/comments?

Regards,
Nicolas

[1] https://github.com/raspberrypi/linux/issues/3777#issuecomment-698346991


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2020-11-12 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 15:30 Nicolas Saenz Julienne [this message]
2020-11-13  1:46 ` Is delayed work's precision good enough for input-poller? Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1d48a94a9f080534d4940048081d5ecdc64d4e9.camel@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).