fingerprint: inscreen: allow to set_fod_rect at boot
authorJesse Chan <jc@lineageos.org>
Fri, 8 May 2020 16:26:54 +0000 (00:26 +0800)
committerJan Altensen <info@stricted.net>
Sat, 16 May 2020 15:41:10 +0000 (17:41 +0200)
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 <jc@lineageos.org>
hidl/fingerprint/inscreen/FingerprintInscreen.cpp
hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h

index 1b1f3137b349591f8c2fb375e367bd7089497a8d..d41f9c9dfa0c9c3aa7acfaa95343c4a29943814c 100644 (file)
@@ -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<void> FingerprintInscreen::onStartEnroll() { return Void(); }
 
index 92ea3b41757c997185fb9dc1d5b582fe1f4433dc..72b616d237a4fa169622cec3e5502031694063ca 100644 (file)
@@ -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