From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Maurus Cuelenaere <mcuelenaere@gmail.com>
Cc: Shine Liu <shinel@foxmail.com>,
Nelson Castillo <arhuaco@freaks-unidos.net>,
dtor@mail.ru, dmitry.torokhov@gmail.com,
linux-arm-kernel@lists.infradead.org,
linux-input@vger.kernel.org
Subject: Re: [PATCH] input/touchscreen: add S3C24XX SoC touchscreen input driver
Date: Mon, 19 Oct 2009 13:07:44 +0100 [thread overview]
Message-ID: <20091019120744.GB7412@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4ADC4D4D.5020508@gmail.com>
On Mon, Oct 19, 2009 at 01:28:13PM +0200, Maurus Cuelenaere wrote:
> Do you know that there's another patch (at Openmoko) created by Nelson
> Castillo that does the same, but also has support for kernel-space
> touchscreen filters? (I think [1] is his latest version)
> I don't know how your patch performs, but according to [2] the filters
> should help a lot avoiding jitter etc.
>
> I'm not sure whether Nelson has submitted his patches for mainline
> review yet and what the status is on the kernel filters, but IMHO doing
> some filtering in kernel space (see the "Why are we doing filtering in
> kernel space?" part of [2]) which results in a "cleaner" output is
> preferred over reporting possible "jittery" data.
It doesn't really describe why doing the filtering in kernel space is
apparantly soo much better than doing it in tslib - it's seems to just
do some handwaving kind of argument:
Let's say we would like to deliver a TS event to user space each 10
milliseconds. In the GTA02 with the current configuration the
Analog/Digital conversion time of a sample is 0.4697 milliseconds, thus
can get 18 samples for each event that we send to user-space. Sending the
event (with 18 samples) takes us about 8.45 milliseconds.
So far so good. But, according to my maths, 8.45ms is less than 10ms.
Sometimes we
even decide that the event should not be sent to user-space (because the
hardware didn't provide reliable data), and our tests show that it's the
right thing to do. In previous versions of the driver light taps would
confuse the driver (that would report bad clicks) and this is no longer an
issue.
Err, that doesn't seem to follow on from the previous point.
The reason that we decided raw events should be passed to userspace and
the processing done there is that it allows all of the _policy_ of
deciding how to process touchscreen events to be configured. There's
lots of different parameters and ways to filter touchscreens, and some
are specific to individual touchscreen setups.
This is why tslib is entirely modular, and allows any combination of
modules to be loaded to process the touchscreen samples - it's there
to provide a totally flexible infrastructure to filter and scale
the output from the touchscreen in whatever way is required for the
hardware.
I don't think there is any single filtering system which can properly
filter the output of any one touchscreen, and I don't think that putting
this filtering in the kernel is a sane approach. It _may_ be a sane
approach for one particular touchscreen setup, but it certainly isn't
for all.
next prev parent reply other threads:[~2009-10-19 12:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.4020.1255949705.2256.linux-arm-kernel@lists.infradead.org>
2009-10-19 11:28 ` [PATCH] input/touchscreen: add S3C24XX SoC touchscreen input driver Maurus Cuelenaere
2009-10-19 12:07 ` Russell King - ARM Linux [this message]
2009-10-20 4:21 ` Nelson Castillo
2009-10-20 7:39 ` Russell King - ARM Linux
2009-10-20 8:21 ` Nelson Castillo
2009-10-20 9:41 ` Mark Brown
2009-10-23 5:38 ` Nelson Castillo
2009-10-20 10:09 ` Andy Green
2009-10-19 13:31 ` Shine Liu
2009-10-19 14:44 ` Arnaud Patard
2009-10-19 14:34 ` Juergen Beisert
2009-10-19 10:54 Shine Liu
2009-10-20 1:38 ` 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=20091019120744.GB7412@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=arhuaco@freaks-unidos.net \
--cc=dmitry.torokhov@gmail.com \
--cc=dtor@mail.ru \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=mcuelenaere@gmail.com \
--cc=shinel@foxmail.com \
/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).