Skip to content

Commit

Permalink
Revert "umi: udfps: Disable HBM at fod_status changes"
Browse files Browse the repository at this point in the history
This reverts commit 867d70b.

Reason for revert: Don't need this hack anymore

Change-Id: Ib5786e37ec6e02e1ce525849664eecd0e2a7b272
  • Loading branch information
chaptsand committed Jan 7, 2023
1 parent 605fdd3 commit 9ccded1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
3 changes: 0 additions & 3 deletions init/init.xiaomi.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 0 additions & 16 deletions udfps/UdfpsHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <android-base/logging.h>
#include <android-base/unique_fd.h>
#include <fcntl.h>
#include <fstream>
#include <poll.h>
#include <thread>
#include <unistd.h>
Expand All @@ -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 <typename T>
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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
}
Expand Down

0 comments on commit 9ccded1

Please # to comment.