From 9ccded181d402822f5dc6665642c252e85bd47a8 Mon Sep 17 00:00:00 2001 From: ChaptSand Date: Tue, 3 Jan 2023 21:18:08 +0800 Subject: [PATCH] Revert "umi: udfps: Disable HBM at fod_status changes" This reverts commit 867d70b2baec1b22ff2dfc35a9e9cd78e2d4afca. Reason for revert: Don't need this hack anymore Change-Id: Ib5786e37ec6e02e1ce525849664eecd0e2a7b272 --- init/init.xiaomi.rc | 3 --- udfps/UdfpsHandler.cpp | 16 ---------------- 2 files changed, 19 deletions(-) diff --git a/init/init.xiaomi.rc b/init/init.xiaomi.rc index b6cb3d74..0c339b19 100644 --- a/init/init.xiaomi.rc +++ b/init/init.xiaomi.rc @@ -92,9 +92,6 @@ on boot chmod 0666 /dev/input/event2 - chown system system /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/disp_param - chmod 0660 /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/disp_param - on property:sys.boot_completed=1 # configure input boost settings write /sys/devices/system/cpu/cpu_boost/input_boost_freq "0:1344000" diff --git a/udfps/UdfpsHandler.cpp b/udfps/UdfpsHandler.cpp index 83bb9aca..81b5af9a 100644 --- a/udfps/UdfpsHandler.cpp +++ b/udfps/UdfpsHandler.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -28,24 +27,11 @@ #define TOUCH_MAGIC 0x5400 #define TOUCH_IOC_SETMODE TOUCH_MAGIC + 0 -#define DISPPARAM_PATH "/sys/devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/disp_param" -#define DISPPARAM_FOD_HBM_OFF "0xE0000" - static const char* kFodUiPaths[] = { "/sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui", "/sys/devices/platform/soc/soc:qcom,dsi-display/fod_ui", }; -namespace { - -template -static void set(const std::string& path, const T& value) { - std::ofstream file(path); - file << value; -} - -} // anonymous namespace - static bool readBool(int fd) { char c; int rc; @@ -114,7 +100,6 @@ class XiaomiKonaUdfpsHandler : public UdfpsHandler { void onAcquired(int32_t result, int32_t vendorCode) { if (result == FINGERPRINT_ACQUIRED_GOOD) { - set(DISPPARAM_PATH, DISPPARAM_FOD_HBM_OFF); int arg[2] = {TOUCH_FOD_ENABLE, FOD_STATUS_OFF}; ioctl(touch_fd_.get(), TOUCH_IOC_SETMODE, &arg); } else if (vendorCode == 21 || vendorCode == 23) { @@ -128,7 +113,6 @@ class XiaomiKonaUdfpsHandler : public UdfpsHandler { } void cancel() { - set(DISPPARAM_PATH, DISPPARAM_FOD_HBM_OFF); int arg[2] = {TOUCH_FOD_ENABLE, FOD_STATUS_OFF}; ioctl(touch_fd_.get(), TOUCH_IOC_SETMODE, &arg); }