alarm-tegra-x1 / reference/switchroot-mainline/0023-input-touschscreen-stmfts-Sync-mt-events-on-input.patch

raw file 1220 bytes
From f1031914509b7c96d45c672c34a8c2ad78780d26 Mon Sep 17 00:00:00 2001
From: Billy Laws <[email protected]>
Date: Sun, 24 Feb 2019 10:50:38 +0000
Subject: [PATCH 118/124] input: touschscreen: stmfts: Sync mt events on input

Without this several programs detect taps as hovers
due to BTN_TOUCH being set but not reported.

Signed-off-by: Billy Laws <[email protected]>
---
 drivers/input/touchscreen/stmfts.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen/stmfts.c
index 797c2048a293..af5b4ecc70e9 100644
--- a/drivers/input/touchscreen/stmfts.c
+++ b/drivers/input/touchscreen/stmfts.c
@@ -204,6 +204,7 @@ static void stmfts_report_contact_event(struct stmfts_data *sdata,
 	input_report_abs(sdata->input, ABS_MT_PRESSURE, area);
 	input_report_abs(sdata->input, ABS_MT_ORIENTATION, orientation);
 
+	input_mt_sync_frame(sdata->input);
 	input_sync(sdata->input);
 }
 
@@ -215,6 +216,7 @@ static void stmfts_report_contact_release(struct stmfts_data *sdata,
 	input_mt_slot(sdata->input, slot_id);
 	input_mt_report_slot_state(sdata->input, MT_TOOL_FINGER, false);
 
+	input_mt_sync_frame(sdata->input);
 	input_sync(sdata->input);
 }
 
-- 
2.20.1