summaryrefslogtreecommitdiff
path: root/drivers/hid/bpf/progs/Wacom__ArtPen.bpf.c
AgeCommit message (Collapse)AuthorFilesLines
2024-06-14HID: bpf: convert in-tree fixes into struct_opsBenjamin Tissoires1-0/+4
Very mechanical: - Change HID_BPF_DEVICE_EVENT and HID_BPF_RDESC_FIXUP #defines - add a matching SEC(".struct_ops.link") - in ArtistPro16Gen2 make the 2 functions static and have a new one calling them Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-7-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-06-14HID: bpf: add defines for HID-BPF SEC in in-tree bpf fixesBenjamin Tissoires1-1/+1
We are going to switch over struct_ops, so instead of having to manually replace all fields one by one, let's have a common place to change it. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-6-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-05-07HID: bpf: add in-tree HID-BPF fix for the Wacom ArtPenBenjamin Tissoires1-0/+173
This pen is compatible with multiple Wacom tablets, but we only add support for the Intuos Pro 2 M, as this is the one our user reported the bug against. We can not generically add all compatible Wacom tablets as we are writing the offsets by hand. The point of this HID-BPF program is to work around a firmware limitation where the pressure is repeated every other report. Given that we know this will happen, we can change the first new pressure information with the mean compared to the previous one. This way we smooth the incoming pressure without losing information. Cc: Ping Cheng <pinglinux@gmail.com> Cc: Jason Gerecke <killertofu@gmail.com> Cc: Aaron Armstrong Skomra <skomra@gmail.com> Cc: Joshua Dickens <Joshua@joshua-dickens.com> Link: https://lore.kernel.org/r/20240410-bpf_sources-v1-6-a8bf16033ef8@kernel.org Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>