[PATCH] HID: bpf: Add Goodix GXTP7863 touchpad telemetry fix

From: Ruzal Daminov

Date: Wed Sep 23 2026 - 10:42:10 EST


The Goodix GXTP7863 touchpad found on Honor MagicBook laptops emits a
periodic 1-Hz telemetry heartbeat report on vendor page 0xFF01.

Because page 0xFF01 is historically mapped to HP vendor hotkeys in
hid-input, changing telemetry payload bytes are misinterpreted as
brightness keypresses, resulting in an endless KEY_BRIGHTNESSUP loop.

Remap the vendor telemetry page to an ignored vendor page to prevent
hid-input from creating a bogus keyboard node, while keeping the raw
reports available through hidraw for firmware updates.

Tested on Honor MagicBook X14 Plus (FMI-76, AMD Ryzen 8845HS).

Signed-off-by: Ruzal Daminov <daminovruzal7@xxxxxxxxx>
---
src/bpf/testing/0010-Goodix__GXTP7863.bpf.c | 66 +++++++++++++++++++++
src/bpf/testing/meson.build | 1 +
2 files changed, 67 insertions(+)
create mode 100644 src/bpf/testing/0010-Goodix__GXTP7863.bpf.c

diff --git a/src/bpf/testing/0010-Goodix__GXTP7863.bpf.c b/src/bpf/testing/0010-Goodix__GXTP7863.bpf.c
new file mode 100644
index 0000000..84372c7
--- /dev/null
+++ b/src/bpf/testing/0010-Goodix__GXTP7863.bpf.c
@@ -0,0 +1,66 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/* Copyright (c) 2026 Ruzal Daminov */
+
+/*
+ * Goodix GXTP7863 Touchpad Telemetry Fix
+ *
+ * Problem: The touchpad sends periodic 1-Hz heartbeat reports on Report ID 8
+ * with Vendor Usage Page 0xFF01. hid-input treats Usage Page 0xFF01 as
+ * HID_UP_HPVENDOR2, misinterpreting changing telemetry bytes as phantom
+ * KEY_BRIGHTNESSUP events.
+ *
+ * Fix: Remap the vendor telemetry collection to an ignored vendor usage page.
+ * This prevents hid-input from creating a bogus keyboard input node while
+ * keeping raw reports accessible via hidraw for firmware updates.
+ */
+
+#include "vmlinux.h"
+#include "hid_bpf.h"
+#include "hid_bpf_helpers.h"
+#include <bpf/bpf_tracing.h>
+
+#define I2C_VENDOR_ID_GOODIX 0x27c6
+#define I2C_DEVICE_ID_GOODIX_01E0 0x01e0
+
+HID_BPF_CONFIG(
+ HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX, I2C_DEVICE_ID_GOODIX_01E0)
+);
+
+SEC(HID_BPF_RDESC_FIXUP)
+int BPF_PROG(hid_fix_rdesc_goodix_touchpad, struct hid_bpf_ctx *hctx)
+{
+ __u8 *data = hid_bpf_get_data(hctx, 0, 4096);
+
+ if (!data)
+ return 0;
+
+ if (hctx->size == 705) {
+ /*
+ * Report 8: Change Usage Page from 0xFF01 (HID_UP_HPVENDOR2)
+ * to 0xFF09 (HID_UP_LOGIVENDOR2) at index 625.
+ */
+ if (data[625] == 0x06 && data[626] == 0x01 && data[627] == 0xff &&
+ data[632] == 0x85 && data[633] == 0x08) {
+ data[626] = 0x09;
+ }
+ }
+
+ return 0;
+}
+
+HID_BPF_OPS(goodix_touchpad_ops) = {
+ .hid_rdesc_fixup = (void *)hid_fix_rdesc_goodix_touchpad,
+};
+
+SEC("syscall")
+int probe(struct hid_bpf_probe_args *ctx)
+{
+ if (ctx->rdesc_size != 705) {
+ ctx->retval = -EINVAL;
+ return 0;
+ }
+ ctx->retval = 0;
+ return 0;
+}
+
+char _license[] SEC("license") = "GPL";
diff --git a/src/bpf/testing/meson.build b/src/bpf/testing/meson.build
index 73158c9..97435ad 100644
--- a/src/bpf/testing/meson.build
+++ b/src/bpf/testing/meson.build
@@ -11,6 +11,7 @@ tracing_sources = [
'0010-Iiyama__ProLite-TE9804MIS.bpf.c',
'0010-XPPen__DecoSE.bpf.c',
'0010-Corsair__K70-CORE.bpf.c',
+ '0010-Goodix__GXTP7863.bpf.c',
]

# 'sources' are BPF programs only compatible with
--
2.55.0