summaryrefslogtreecommitdiff
path: root/sys/dev/evdev/evdev_mt.c
Commit message (Collapse)AuthorAgeFilesLines
* evdev: Add parentheses around '-' expression in operand of '&'.John Baldwin2021-11-301-1/+1
| | | | | | | | | This fixes a -Wparentheses error with GCC 9. Reviewed by: wulf Differential Revision: https://reviews.freebsd.org/D31947 (cherry picked from commit d99c87c8d54a02a229cbeaa19ec8784b1d5afbb9)
* evdev: Add support for automatic MT protocol type A to type B conversion.Vladimir Kondratyev2021-09-071-2/+30
| | | | (cherry picked from commit d056693d7bc6c1b5f2c1612e5b34807f173e21c7)
* evdev: Add implicit mode for touch tracking.Vladimir Kondratyev2021-09-071-6/+91
| | | | | | | | | | | | In implicit mode assignment of slot number and tracking id is performed automatically on each synchronization requested by device driver. This is done with creation of intermediate buffer for multitouch events. This buffer holds untracked events until synchronization is requested by device driver. It is needed as touch assigment requires knowledges of all touch positions pushed in current and previous reports. (cherry picked from commit f76051c7dabe952b75127a8031d87d78b603be20)
* evdev: Import support for touch-tracking.Vladimir Kondratyev2021-09-071-2/+209
| | | | | | | | | | | | | | | Touch tracking is a process of assignment of unique trackingID to each initiated contact on the surface. Keeping the trackingIDs persistent across multitouch reports requires solving of so called Euclidian Bipartite Matching problem. This commit imports EBM-solver implementation based on Dinitz-Kronrod algorithm to find minimum cost matching between contacts listed in two consecutive reports. Obtained from: OpenBSD (cherry picked from commit 4c0a134e32a7f4dec556fea15c8de22f69864492)
* evdev: Make MT tracking IDs monotonically increasing sequence.Vladimir Kondratyev2021-09-071-1/+34
| | | | (cherry picked from commit 66bd52f5e241bd2548015f847f12cdff69176c40)
* evdev: Give short aliases to items of evdev_mt_slot arrayVladimir Kondratyev2021-09-071-14/+49
| | | | | | | | | | | with using of unioned anonymous structure. Access to the same data by using different members of union generally works despite it is not supported by C specs. Also add helper function to report entire slot state. (cherry picked from commit 059360287e3344f48f5a7839e2d6d54016b18b19)
* evdev: Normalize width and pressure of single touch compat eventsVladimir Kondratyev2021-09-071-18/+49
| | | | | | to match Synaptics touchpad reporting range. (cherry picked from commit 127e54deb6d8899e1dc1bc6251d512e19f21b0f1)
* evdev: force no fuzz for autogenerated single touch compat events.Vladimir Kondratyev2021-09-071-1/+1
| | | | | | | As fuzz has already been applied on multitouch event processing. This allows to remove existing workaround for double fuzz procesing. (cherry picked from commit 314913ed7c6e6e1b7c80a1063620f478961419b7)
* evdev: Send first active rather than 0-th slot state as ST reportVladimir Kondratyev2021-09-071-4/+5
| | | | (cherry picked from commit fbe17f9017e785dd564ce7fc5553a9136d3a0b03)
* evdev: Use bitsets to track active touches and slots changed in current reportVladimir Kondratyev2021-09-071-51/+43
| | | | | | Obtained from: OpenBSD (cherry picked from commit 2dc7188e532f0147b36a44ce5c033d9f59cbd9f4)
* evdev: Multitouch code style changes.Vladimir Kondratyev2021-09-071-83/+69
| | | | | | | | | | | 1. Move touch count reporting helpers to utils. They are not multitouch. 2. Use evdev_mt prefix for private multitouch support routines. 3. Use int instead of int32_t where fixed size is not required. 4. Export some internal functions. This change should be no-op. (cherry picked from commit 98a7606b85e05132f328a2498dccab78df31cb7e)
* evdev: Remove useless "initial value" parameter from evdev_support_abs()Vladimir Kondratyev2021-01-071-1/+0
| | | | | It can not be used for setting of state of multitouch events. If necessary, use evdev_push_event() instead of it.
* Change my email address to wulf@FreeBSD.org in copyright headers.Vladimir Kondratyev2017-07-231-1/+1
| | | | | | | | Approved by: gonzo (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=321399
* evdev: Macroize common locking sequencesVladimir Kondratyev2017-07-231-12/+4
| | | | | | | | | Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=321398
* evdev: style(9), sort headers alphabeticallyVladimir Kondratyev2017-07-231-2/+2
| | | | | | | | | | Pointed out by: bde Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=321397
* Implement EVDEV_FLAG_MT_AUTOREL flag (autorelease touchpoints)Oleksandr Tymoshenko2016-10-081-4/+19
| | | | | | | | | | | | | | | Automaticaly release (send ABS_MT_TRACKING_ID = -1) MT-slots that has not been listed in current MT protocol type B report. Slot is counted as listed if corresponding ABS_MT_SLOT event has been sent regardless of other MT events. Events are sent on SYN_REPORT event. Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> Notes: svn path=/head/; revision=306857
* Allow using of driver's mutex instead internal one for evdev locking.Oleksandr Tymoshenko2016-10-081-4/+12
| | | | | | | | | | | | | | | Add new API call: evdev_register_mtx which takes lock argument that should be used instead of internal one for evdev locking. Useful for cases if evdev_push_event() is always called with driver's lock taken and reduces amount of lock aquisitions. This allows to avoid LOR between ev_open/ev_close invocations and evdev_push_event() Such LOR can happen when ev_open/ev_close methods acquire driver lock and evdev_push_event() is called with this lock taken. Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> Notes: svn path=/head/; revision=306855
* Add evdev protocol implementationOleksandr Tymoshenko2016-09-111-0/+269
evdev is a generic input event interface compatible with Linux evdev API at ioctl level. It allows using unmodified (apart from header name) input evdev drivers in Xorg, Wayland, Qt. This commit has only generic kernel API. evdev support for individual hardware drivers like ukbd, ums, atkbd, etc. will be committed later. Project was started by Jakub Klama as part of GSoC 2014. Jakub's evdev implementation was later used as a base, updated and finished by Vladimir Kondratiev. Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru> Reviewed by: adrian, hans Differential Revision: https://reviews.freebsd.org/D6998 Notes: svn path=/head/; revision=305706