Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measure and fix poll rate of raspberrypi-ts #45

Closed
lategoodbye opened this issue Oct 7, 2019 · 4 comments
Closed

Measure and fix poll rate of raspberrypi-ts #45

lategoodbye opened this issue Oct 7, 2019 · 4 comments

Comments

@lategoodbye
Copy link
Owner

Recent issue in downstream shows a timing issue in polling behavior. As far i can see, this issue still persists in upstream, but the solution might be different.

@lategoodbye
Copy link
Owner Author

@vianpl Could you please give me some hints to test the raspberrypi-ts (especially to wiring and devicetree)?

@vianpl
Copy link
Collaborator

vianpl commented Oct 8, 2019

Hi @lategoodbye!

As far as raspberrypi-ts.c is concerned you can't do much to fix this issue. The firmware mandates the polling rate and that's the faster it'll ever be. IIRC the kernel driver uses the same polling frequency as the one downstream. Which, I assume, is adapted to the firmware's polling speed. To test it just connect the ribbon cable, power and ground then follow Documentation/devicetree/bindings/input/touchscreen/raspberrypi,firmware-ts.txt.

If you want to use the I2C0 bus directly with upstream, bypassing the firmware, then you theoretically could get faster speeds. No need to change the wiring, though there are several issues:

  • I2C0 is a bus used by the firmware not only for the touchscreen but for a lot of other peripherals. So disabling the touch poll thread in the firmware is not an all around solution. I asked the foundation to do something about it (Create firmware based interface to I2C0 raspberrypi/firmware#1138).
  • The non firmware based upstream driver (edt-ft5x06.c) has no polling support, and the touchscreen doesn't generate interrupts. I sent a patch addressing this some time ago, but it got ignored and I forgot about it (https://lkml.org/lkml/2019/4/30/1099). I could review it and re-send it if you see any use for it.

lategoodbye pushed a commit that referenced this issue May 2, 2020
syzbot wrote:
| =============================
| WARNING: suspicious RCU usage
| 5.7.0-rc1+ #45 Not tainted
| -----------------------------
| net/openvswitch/conntrack.c:1898 RCU-list traversed in non-reader section!!
|
| other info that might help us debug this:
| rcu_scheduler_active = 2, debug_locks = 1
| ...
|
| stack backtrace:
| Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014
| Workqueue: netns cleanup_net
| Call Trace:
| ...
| ovs_ct_exit
| ovs_exit_net
| ops_exit_list.isra.7
| cleanup_net
| process_one_work
| worker_thread

To avoid that warning, invoke the ovs_ct_exit under ovs_lock and add
lockdep_ovsl_is_held as optional lockdep expression.

Link: https://lore.kernel.org/lkml/000000000000e642a905a0cbee6e@google.com
Fixes: 11efd5c ("openvswitch: Support conntrack zone limit")
Cc: Pravin B Shelar <pshelar@ovn.org>
Cc: Yi-Hung Wei <yihung.wei@gmail.com>
Reported-by: syzbot+7ef50afd3a211f879112@syzkaller.appspotmail.com
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
@lategoodbye
Copy link
Owner Author

It seems that there is still an issue with the polling rate.

@lategoodbye
Copy link
Owner Author

Close this, because the non-firmware driver edt-ft5x06 is the right way tm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants