lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 Feb 2017 08:14:09 +0100
From:   "H. Nikolaus Schaller" <>
To:     Pali Rohár <>
Cc:     Dmitry Torokhov <>,
        Sebastian Reichel <>,
        Mark Rutland <>,
        Benoît Cousson <>,
        Tony Lindgren <>,
        Russell King <>,
        Arnd Bergmann <>,
        Michael Welling <>,
        Mika Penttilä <>,
        Javier Martinez Canillas <>,
        Igor Grinberg <>,
        "Andrew F. Davis" <>, Mark Brown <>,
        Jonathan Cameron <>,
        Rob Herring <>,
        Alexander Stein <>,
        Eric Engestrom <>,
        Hans de Goede <>,
        Benjamin Tissoires <>,
        Petr Cvek <>,
        Mauro Carvalho Chehab <>,
        Hans Verkuil <>,
        Nick Dyer <>,
        Siebren Vroegindeweij <>,
        Michel Verlaan <>,,
        devicetree <>,
        LKML <>,
        linux-omap <>,
        Discussions about the Letux Kernel 
        <>,,, Aaro Koskinen <>,
        Pavel Machek <>,
        Andrey Gelman <>,
        Haibo Chen <>
Subject: Re: [PATCH v9 1/8] drivers:input:tsc2007: add new common binding names, pre-calibration, flipping and rotation

Hi Pali,

> Am 20.02.2017 um 20:42 schrieb Pali Rohár <>:
> Hi Nikolaus!
> On Monday 20 February 2017 17:50:04 H. Nikolaus Schaller wrote:
>> Hi Dmitry,
>>> Input driver may set resolution for given axis in units per mm (or
>>> units per radian for rotational axis ABS_RX, ABS_RY, ABS_RZ), and
>>> if you check the binding, you can use "touchscreen-x-mm" and
>>> "touchscreen-y-mm" to specify the size of entire touch surface and
>>> set resolution from it so that userspace can calculate the proper
>>> scaling factor.
>> How is this information exposed by the kernel to user-space? By
>> scanning the DT file or tree?
> Set input_abs_set_res() from kernel.

I can't find this function defined anywhere but used in 101 LOC.
LXR doesn't know it either:

What is going on here?

> And in userspace call EVIOCGABS
> ioctl() on input device. Look at struct input_absinfo, you should have
> all needed information here. This is generic input interface, no DT is
> needed.

Ok, if this is not set by a driver it is indeed a driver bug.

But we have to define it's value in DT because the tsc2007 does not know
anything about the panel dimensions.

IMHO something that should be done by generic of_touchscreen.c

If of_touchscreen would simply pass the touchscreen-size parameters
to input_abs_set_res() and the bindings would define it to be units/mm
it might have saved us all a lot of work and discussion.

> I hope that XServer is already using it for evdev devices...
> For whole implementation look at evtest program. That should be good
> starting point for your userspace implementation.
> While I'm watching this discussion... in my opinion kernel should just
> invert input axes (when needed) and should not do any other
> normalization or integer/floating-point re-calibration/re-calculation.
> If it correctly exports minimum value, maximum value and resolution then
> userspace can correctly re-scale input events to units which userspace
> needs (e.g. mapping into LCD screen pixels or whatever is needed).

BR and thanks,

Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists