summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWendly Li <wendlyli@google.com>2023-06-08 17:04:40 +0000
committerWendly Li <wendlyli@google.com>2023-06-14 07:56:17 +0000
commit58f596100ba39761ed23c2341a8c740da1344842 (patch)
treeb6ad07df1dac4eb7d0150e54ddda9ad7188a3a73
parent2778dc31e64021ea0554962c771410570bb14501 (diff)
downloadcommon-58f596100ba39761ed23c2341a8c740da1344842.tar.gz
gti: add debugging message for tracing coordinates
Bug: 285872480 Test: check the log is correct Change-Id: I23c27a19349edc32b607b98a4d7f9d3c5f0659ca Signed-off-by: Wendly Li <wendlyli@google.com>
-rw-r--r--goog_touch_interface.c12
-rw-r--r--goog_touch_interface.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c
index dbb911c..e87426b 100644
--- a/goog_touch_interface.c
+++ b/goog_touch_interface.c
@@ -2347,6 +2347,7 @@ static void goog_offload_set_running(struct goog_touch_interface *gti, bool runn
running, gti->irq_index, gti->input_index);
gti->offload.offload_running = running;
+
goog_update_fw_settings(gti);
}
}
@@ -2428,6 +2429,17 @@ void goog_offload_input_report(void *handle,
}
input_report_key(gti->vendor_input_dev, BTN_TOUCH, touch_down);
input_sync(gti->vendor_input_dev);
+
+ if ((slot_bit_active ^ gti->slot_bit_active) != 0) {
+ if (gti->slot_bit_last_active != gti->slot_bit_active ||
+ gti->slot_bit_offload_active != slot_bit_active)
+ GOOG_WARN(gti, "Unexpected fingers FW: %lu offload: %lu",
+ hweight_long(gti->slot_bit_active),
+ hweight_long(slot_bit_active));
+ }
+ gti->slot_bit_last_active = gti->slot_bit_active;
+ gti->slot_bit_offload_active = slot_bit_active;
+
goog_input_unlock(gti);
if (touch_down)
diff --git a/goog_touch_interface.h b/goog_touch_interface.h
index a83c28e..da69f2c 100644
--- a/goog_touch_interface.h
+++ b/goog_touch_interface.h
@@ -610,6 +610,8 @@ struct gti_pm {
* @slot_bit_in_use: bitmap of slot in use for this input process cycle.
* @slot_bit_changed: bitmap of slot state changed for this input process cycle.
* @slot_bit_active: bitmap of active slot during GTI lifecycle.
+ * @slot_bit_last_active: bitmap of last active slot when reporting offload inputs.
+ * @slot_bit_offload_active: bitmap of active slot from offload.
* @dev_id: dev_t used for google interface driver.
* @panel_id: id of the display panel.
* @charger_state: indicates a USB charger is connected.
@@ -698,6 +700,8 @@ struct goog_touch_interface {
unsigned long slot_bit_in_use;
unsigned long slot_bit_changed;
unsigned long slot_bit_active;
+ unsigned long slot_bit_last_active;
+ unsigned long slot_bit_offload_active;
dev_t dev_id;
int panel_id;
char fw_name[64];