Commit Graph

4 Commits

Author SHA1 Message Date
Steve Pfetsch
55e8fbaf5e input: touchscreen: touch_offload: protect access to reserved_frame
Require that a frame from the buffer pool is only held for the time
required to populate it in the touch driver's interrupt handler. This
ensures that buffers are only freed when they are not in use by the
client touch driver.

Bug: 139955910
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: Id7ab070d5a11dbae89292f09c0212357063d652e
2020-07-10 22:01:00 +00:00
Steve Pfetsch
96a4b9c6a0 input: touchscreen: touch_offload: Add poll() file operation
Add support for the poll file operation so consumers do not appear to be
livelocked when blocked on reads for an extended period of time.

Bug: 139955910
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: I70381241a6317f5b56415444b93ba814368d4e16
2020-07-10 22:00:34 +00:00
Steve Pfetsch
53d9e76ff2 input: touchscreen: touch_offload: register char dev node
Dynamically select major device number and register the touch_offload
device at /dev/touch_offload when the driver is initialized.

Bug: 139955910
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: I5cb01b236fc0733d698898697c83ac117b975501
2020-07-10 21:59:56 +00:00
Steve Pfetsch
523826e6b3 input: touchscreen: touch_offload driver
The touch_offload driver augments traditional touchscreen drivers with
the ability to capture and export heatmap and coordinate touch data for
processing in user space. The driver's client can query the touch data
available, configure which content is captured, read queued data as it
is captured, and report detected touch events back to the driver.

Bug: 139955910
Signed-off-by: Steve Pfetsch <spfetsch@google.com>
Change-Id: Ifa2f003f281bfdf6f289ee3b15cd1ee47220f0ec
2020-07-10 21:58:42 +00:00