From 5502112367b6715547b02b9e8db9320eff49482d Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Sat, 9 May 2020 00:26:54 +0800 Subject: [PATCH] fingerprint: inscreen: allow to set_fod_rect at boot We found that stock firmware calculates the fod rect from resolution and a set of inscreen fingerprint sensor position data at boot and then use set_fod_rect command to tell the Kernel TSP driver. Then the Kernel TSP driver wrote it to "sponge" (presumably firmware of touchscreen panel). It is not yet known what exactly was done with this data but it is good to keep in line with stock firmware when we can. Change-Id: Id44d399a8dc482c7d6f320a3bbfea1282ac4f83a Signed-off-by: Jesse Chan --- hidl/fingerprint/inscreen/FingerprintInscreen.cpp | 6 +++++- .../inscreen/include/samsung_fingerprint_inscreen.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp index 1b1f3137..d41f9c9d 100644 --- a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp +++ b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp @@ -74,7 +74,11 @@ static T get(const std::string& path, const T& def) { } } -FingerprintInscreen::FingerprintInscreen() {} +FingerprintInscreen::FingerprintInscreen() { +#ifdef FOD_SET_RECT + set(TSP_CMD_PATH, FOD_SET_RECT); +#endif +} Return FingerprintInscreen::onStartEnroll() { return Void(); } diff --git a/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h b/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h index 92ea3b41..72b616d2 100644 --- a/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h +++ b/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h @@ -24,6 +24,8 @@ #define FOD_ENABLE "fod_enable,1,1" #define FOD_DISABLE "fod_enable,0" +// #define FOD_SET_RECT "set_fod_rect,554,2263,886,2595" + #define FINGERPRINT_ACQUIRED_VENDOR 6 #define VENDORCODE_FINGER_DOWN 9002 #define VENDORCODE_FINGER_UP 9001