From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>,
Mark Brown <broonie@kernel.org>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org, linux-spi@vger.kernel.org,
David Jander <david@protonic.nl>
Subject: Re: [PATCH v2 2/2] Input: ads7846: convert to one message
Date: Tue, 17 Nov 2020 16:31:38 -0800 [thread overview]
Message-ID: <20201118003138.GD2009714@dtor-ws> (raw)
In-Reply-To: <20201110085041.16303-3-o.rempel@pengutronix.de>
On Tue, Nov 10, 2020 at 09:50:41AM +0100, Oleksij Rempel wrote:
> Convert multiple full duplex transfers in to a single transfer to reduce
> CPU load.
>
> Current driver version support following filtering modes:
> - ads7846_no_filter() - not filtered
> - ads7846_debounce_filter() - driver specific debounce filter
> - pdata->filter - platform specific debounce filter (do any platform
> provides such filter?)
>
> Without filter this HW is not really usable, since the physic of
> resistive touchscreen can provide some bounce effects. With driver internal
> filter, we have constant amount of retries + debounce retries if some anomaly
> was detected.
>
> High amount of tiny SPI transfers is the primer reason of high CPU load
> and interrupt frequency.
>
> This patch create one SPI transfer with all fields and not optional retires. If
> bounce anomaly was detected, we will make more transfer if needed.
>
> Without this patch, we will get about 10% CPU load on iMX6S on pen-down event.
> For example by holding stylus on the screen.
>
> With this patch, depending in the amount of retries, the CPU load will
> be 1% with "ti,debounce-rep = <3>".
>
> One buffer transfer allows us to use PIO FIFO or DMA engine, depending
> on the platform.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Applied, thank you.
--
Dmitry
next prev parent reply other threads:[~2020-11-18 0:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 8:50 [PATCH v1 0/2] Input: ads7846: reduce SPI related CPU load Oleksij Rempel
2020-11-10 8:50 ` [PATCH v2 1/2] Input: ads7846: convert to full duplex Oleksij Rempel
2020-11-18 0:31 ` Dmitry Torokhov
2020-11-10 8:50 ` [PATCH v2 2/2] Input: ads7846: convert to one message Oleksij Rempel
2020-11-18 0:31 ` Dmitry Torokhov [this message]
2021-01-20 7:40 ` Oleksij Rempel
2021-01-21 7:24 ` 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=20201118003138.GD2009714@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=alexandru.ardelean@analog.com \
--cc=broonie@kernel.org \
--cc=david@protonic.nl \
--cc=kernel@pengutronix.de \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.