Page MenuHomeFreeBSD

psm(4): evdev support + psm&atkbdc locking
AbandonedPublic

Authored by wulf_cicgroup.ru on Mar 30 2017, 6:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 1:03 AM
Unknown Object (File)
Sat, Dec 7, 6:31 AM
Unknown Object (File)
Sat, Dec 7, 5:21 AM
Unknown Object (File)
Sat, Dec 7, 5:21 AM
Unknown Object (File)
Tue, Dec 3, 6:05 AM
Unknown Object (File)
Thu, Nov 28, 5:40 AM
Unknown Object (File)
Wed, Nov 27, 1:28 AM
Unknown Object (File)
Wed, Nov 27, 1:08 AM
Subscribers

Details

Reviewers
gonzo
Summary

atkbdc(4): Serialize hardware access with mutex

In 4.x days it was serialized with spl() calls and kbdc lock flag
After 5.x it became protected with giant lock.
Restore 4.x logic with replacing kbdc lock flag acquiring with
atkbdc lock aquiring.

psm(4): Serialize softc access with mutex

psm(4): Add EVDEV support

psm(4): Several minor fixes and adjustments to psm tunables, mostly touchpads-related

  1. Fix rare but quite annoying issue in Elan hw v.4 touchpads support. Triple-finger taps are reported as double-finger taps under several circumstances.
  2. Adjust tap min queue size on Elans to make multifinger tap detection more reliable.
  3. Adjust Elantech palm width threshold to nearly match synaptics defaults
  4. Discard pointer movements rather then mouse packets on palm detection to reduce cursor jumping.
  5. Enable palm detection on two finger touches for multitouch trackpads.
  6. Report 3-rd and 4-th fingers as first finger for Elan hw v.2 and v.3 as Linux does. It should not affect gesture processing in current state as it ignores finger coords on 3-finger tap detection but it should make evdev reports looking more Linux-alike.
  7. Set predefined logical touchpad sizes for several ancient Elan hw v.2 models. This change is based on Linux driver. Not tested
  8. Determine logical trace size. It used for calculation of touch sizes in surface units for MT-protocol type B evdev reports.
  9. Remove direct inclusion of sys/libkern.h header as it is a style bug.
  10. Reduce synaptics touch sensitivity Increase hw.psm.synaptics.min_pressure default value from 16 to 32 to nearly match Linux driver (30-35 hysteresis loop). This makes libinput tap detection more reliable.
Test Plan

Tested with Elan v.4 and Semi-MT synaptics touchpads hardware.
No relative-reporting devices (real PS/2 mices) have been tested. Only absolute ones (touchpads).
No psm-related witness warnings observed.
Evdev bits were tested with xf86-input-synaptics and xf86-input-libinput drivers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I will broadcast CFT of this change on current- and mobile- lists in couple of days

Hi Vladimir,

Could you split this review into several independent ones? From maintainability point of view - unless changes depend on each other it's better to commit them separately. It gives clear scope of change based on commit message and better granularity when bisecting regression. While if you combine them into one commit it's not clear which diff chunk corresponds to which functional change and if something gets broken after commit - which change contributed to it.

Thanks.

Hi. Oleksandr.

Changes are not independent (evdev depends on psm that depends on atkbdc), but there should be no errors at each step if they are applied one by one in ascending order
I had split them and created following reviews: https://reviews.freebsd.org/D10263, https://reviews.freebsd.org/D10264, https://reviews.freebsd.org/D10265 and https://reviews.freebsd.org/D10266
Last (10266) change is not split on independent parts yet. I will do that ASAP.

Thank you.

wulf_cicgroup.ru edited the summary of this revision. (Show Details)

Reduce default synaptics touch sensitivity to make libinput tap detection more reliable.
Remove extraneous checks for relative motion events with value = 0. It is already done inside evdev.ko

Device names and product IDs of supported touchpads and trackpoints are updated to match Linux