diff options
| author | Zhengping Jiang <jiangzp@google.com> | 2026-10-15 06:42:23 +0000 |
|---|---|---|
| committer | Benjamin Tissoires <bentiss@kernel.org> | 2026-10-28 10:38:41 +0100 |
| commit | 720806515cb6921ab05caaa6f470f7054b56385e (patch) | |
| tree | c959a814084e939fe2c37a88a6d09a93fff6508e /tools/perf/scripts/python/bin | |
| parent | 8dbf66b011135422a28ee32da1d6aacbe08ddd7a (diff) | |
HID: vivaldi: avoid redundant feature report reads per usage
vivaldi_feature_mapping() is invoked by report_features() in ascending
usage_index order for each usage in the top-row physical keymap field.
Because fetching the feature report at usage_index == 0 already reads
the entire report from hardware, calling hid_hw_raw_request() again for
subsequent usages redundantly reads the same report N times (e.g., 12
sequential BLE GATT reads taking ~2s on Vivaldi BLE keyboards).
Bail out immediately when usage->usage_index != 0, fetch the feature
report once at usage_index == 0, and iterate over all usages in the
field to populate data->function_row_physmap[].
Fixes: 33bbe04a15f2 ("HID: google: extract Vivaldi hid feature mapping for use in hid-hammer")
Signed-off-by: Zhengping Jiang <jiangzp@google.com>
Link: https://patch.msgid.link/20261015064223.1939367-1-jiangzp@google.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
