From 40eff5adcd3839d75ff46071f1de364f377ff733 Mon Sep 17 00:00:00 2001 From: Shirayuki39 Date: Mon, 12 Aug 2024 18:36:32 +0800 Subject: [PATCH] Revert "LG8n: Temporarily bring back mtkpower stack" This reverts commit 9ed2ce0ae0754bcd495890c6f3022dd2f2a5c286. --- BoardConfig.mk | 4 - configs/perf/power_app_cfg.xml | 819 ------------------------------- configs/perf/powercontable.xml | 864 --------------------------------- configs/perf/powerscntbl.xml | 24 - device.mk | 24 +- power/power-mode.cpp | 47 -- proprietary-files.txt | 21 - 7 files changed, 15 insertions(+), 1788 deletions(-) delete mode 100644 configs/perf/power_app_cfg.xml delete mode 100644 configs/perf/powercontable.xml delete mode 100644 configs/perf/powerscntbl.xml delete mode 100644 power/power-mode.cpp diff --git a/BoardConfig.mk b/BoardConfig.mk index 568ec69..dbbb6ba 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -143,10 +143,6 @@ TARGET_OTA_ASSERT_DEVICE := LG8n,TECNO-LG8n TARGET_BOARD_PLATFORM := mt6789 BOARD_HAS_MTK_HARDWARE := true -# Power -TARGET_TAP_TO_WAKE_NODE := /proc/gesture_function -TARGET_POWERHAL_MODE_EXT := $(COMMON_PATH)/power/power-mode.cpp - # Properties TARGET_SYSTEM_PROP += $(CONFIGS_PATH)/properties/system.prop TARGET_VENDOR_PROP += $(CONFIGS_PATH)/properties/vendor.prop diff --git a/configs/perf/power_app_cfg.xml b/configs/perf/power_app_cfg.xml deleted file mode 100644 index 44461be..0000000 --- a/configs/perf/power_app_cfg.xml +++ /dev/null @@ -1,819 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/configs/perf/powercontable.xml b/configs/perf/powercontable.xml deleted file mode 100644 index 99d29a3..0000000 --- a/configs/perf/powercontable.xml +++ /dev/null @@ -1,864 +0,0 @@ - - - - more - 6 - 0 - 6 - - - more - 2 - 0 - 2 - - - - less - 20 - 1 - - - - more - 20 - 1 - - - - more - 31 - 0 - - - - more - 100 - 0 - - - - more - 1 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 100 - 0 - 0 - - - - more - 100 - 0 - 0 - - - - more - 100 - 0 - 0 - - - - more - 100 - 0 - 0 - - - - more - 100 - 0 - 0 - - - - more - 100 - 0 - 0 - - - - less - 100 - 0 - 100 - - - - less - 100 - 0 - 100 - - - - less - 100 - 0 - 100 - - - - less - 100 - 0 - 100 - - - - less - 100 - 0 - 100 - - - - less - 100 - 0 - 100 - - - - less - 1000000000 - 0 - 1000 - - - - less - 1000000000 - 0 - 1000 - - - - more - 1000000000 - 0 - 1000 - - - - more - 1000000000 - 0 - 1000 - - - - more - 1 - 0 - 0 - dsu_mode^ - - - - more - 15 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 6553599 - 1 - 130 - - - - more - 60 - 0 - - - - more - 99 - 1 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 2 - 0 - - - - more - 2 - 0 - - - - more - 100 - 0 - - - - more - 100 - 0 - - - - more - 1 - 0 - - - - more - 31 - 0 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 10 - 0 - - - - more - 1 - 0 - 0 - - - - more - 31 - 0 - - - - more - 1 - 0 - - - - more - 1000000 - 33 - - - - more - 1 - 0 - 0 - cm_mgr_camera_enable^ - - - - more - 1 - 0 - 0 - cm_mgr_cpu_map_dram_enable^ - - - - more - 2 - 0 - cm_aggr^ - - - more - 1 - 0 - 1 - - - less - 31 - 0 - 2 - - - less - 31 - 0 - 2 - - - more - 2000 - 10 - 200 - - - more - 1000 - 0 - 100 - - - more - 100 - 0 - 80 - - - more - 1 - 0 - 1 - - - less - 1000000000 - 0 - 0 - - - - more - 2000000000 - 0 - - - - more - 100 - 0 - - - - more - 2000000000 - -1 - 798 - - - - more - 25855 - 0 - 4 - - - - more - 32767 - 1 - - - - more - 32767 - 1 - - - - less - 1 - 0 - - - - more - 100 - 0 - - - - less - 2 - 0 - - - - more - 100 - 0 - 0 - - - - more - 2 - 0 - 0 - - - - more - 20 - 2 - - - - more - 50 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 1000000000 - 0 - 1000000000 - - - - more - 1 - 0 - 0 - - - - more - 9 - 1 - - - - more - 5 - 0 - - - - more - 100 - 0 - 25 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 10000 - 400 - - - - more - 15 - 1 - - - - more - 100 - 0 - - - - more - 100 - 0 - - - - more - 300 - 10 - - - - more - 1000 - 0 - - - - more - 1 - 0 - 1 - - - - more - 100 - 0 - - - - more - 7 - -1 - - - - more - 7 - -1 - - - - less - 1 - 0 - - - - more - 100 - 0 - 95 - - - - more - 50000000 - -50000000 - 1000000 - - - - more - 1 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 1 - 0 - 0 - - - - more - 3000000 - 0 - - - - more - 3000000 - 0 - - - - more - 3000000 - 0 - - - - more - 3000000 - 0 - - - - more - 1 - 0 - - - - more - 1 - 0 - 1 - - - - more - 1 - 0 - - - - more - 2 - 0 - 2 - - - - more - 65535 - 0 - - - - more - 1 - 0 - - - - less - 100 - -100 - - - - more - 100 - 0 - - - - more - 200 - 0 - - - - more - 1 - 0 - - - - more - 200 - 0 - - - - more - 200 - 0 - - - - more - 200 - 0 - - - - more - 200 - 0 - - - - more - 6000 - -6000 - - - - more - 100 - 0 - - - - more - 100 - 0 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 100 - 0 - - - - more - 100 - 0 - - - - more - 100 - 0 - - - - more - 100 - 0 - - - - more - 100 - 0 - - - - more - 100 - 0 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 1 - 0 - - - - more - 100 - -1 - -1 - - - - more - 1 - 0 - - - - more - 200 - 0 - - diff --git a/configs/perf/powerscntbl.xml b/configs/perf/powerscntbl.xml deleted file mode 100644 index 9acdc62..0000000 --- a/configs/perf/powerscntbl.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/device.mk b/device.mk index 7bb2605..1e04e34 100644 --- a/device.mk +++ b/device.mk @@ -403,19 +403,21 @@ PRODUCT_COPY_FILES += \ # Power PRODUCT_PACKAGES += \ - android.hardware.power-service-mediatek \ - android.hardware.power-V2-ndk_platform.vendor \ - android.hardware.power@1.3.vendor + android.hardware.power-service.lineage-libperfmgr PRODUCT_PACKAGES += \ + vendor.mediatek.hardware.mtkpower@1.2-service.stub \ vendor.mediatek.hardware.mtkpower@1.0.vendor \ - vendor.mediatek.hardware.mtkpower@1.1.vendor \ - vendor.mediatek.hardware.mtkpower@1.2.vendor + vendor.mediatek.hardware.mtkpower@1.1.vendor -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/perf/power_app_cfg.xml:$(TARGET_COPY_OUT_VENDOR)/etc/power_app_cfg.xml \ - $(LOCAL_PATH)/configs/perf/powercontable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powercontable.xml \ - $(LOCAL_PATH)/configs/perf/powerscntbl.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powerscntbl.xml +PRODUCT_PACKAGES += \ + android.hardware.power@1.3.vendor \ + libperfctl_vendor + +# Power | Dummy mtkperf lib +PRODUCT_PACKAGES += \ + libmtkperf_client_vendor \ + libmtkperf_client # Power configurations PRODUCT_COPY_FILES += \ @@ -471,7 +473,11 @@ PRODUCT_SHIPPING_API_LEVEL := 31 # Soong namespaces PRODUCT_SOONG_NAMESPACES += \ $(LOCAL_PATH) \ + hardware/lineage/interfaces/power-libperfmgr \ + hardware/google/interfaces \ + hardware/google/pixel \ hardware/mediatek \ + hardware/mediatek/libmtkperf_client \ hardware/transsion # Thermal diff --git a/power/power-mode.cpp b/power/power-mode.cpp deleted file mode 100644 index cad725e..0000000 --- a/power/power-mode.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2021 The LineageOS Project - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include - -namespace aidl { -namespace android { -namespace hardware { -namespace power { -namespace impl { -namespace mediatek { - -using ::aidl::android::hardware::power::Mode; - -bool isDeviceSpecificModeSupported(Mode type, bool* _aidl_return) { - switch (type) { - case Mode::DOUBLE_TAP_TO_WAKE: - *_aidl_return = true; - return true; - default: - return false; - } -} - -bool setDeviceSpecificMode(Mode type, bool enabled) { - switch (type) { - case Mode::DOUBLE_TAP_TO_WAKE: { - ::android::base::WriteStringToFile(enabled ? "cc1" : "cc2", TAP_TO_WAKE_NODE, true); - return true; - } - default: - return false; - } -} - -} // namespace mediatek -} // namespace impl -} // namespace power -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/proprietary-files.txt b/proprietary-files.txt index f03fb4f..0f0a893 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -2635,14 +2635,10 @@ vendor/lib64/libvcodecdrv_header_stub.so # Misc and Potentially Requred Blobs vendor/bin/hw/vendor.mediatek.hardware.tranHwInfo@1.0-service -vendor/bin/fpsgo -vendor/bin/gbe vendor/bin/md_monitor vendor/bin/meta_tst vendor/bin/mt6660_calibration vendor/bin/rt5512_calibration -vendor/etc/init/fpsgo.rc -vendor/etc/init/gbe.rc vendor/etc/init/init.otg.rc vendor/etc/init/md_monitor.rc vendor/etc/init/vendor.mediatek.hardware.tranHwInfo@1.0-service.rc @@ -2780,28 +2776,11 @@ vendor/lib64/vendor.mediatek.hardware.nvram@1.0.so vendor/lib64/vendor.mediatek.hardware.nvram@1.1.so # Power -vendor/bin/hw/vendor.mediatek.hardware.mtkpower@1.0-service vendor/etc/init/bootperf.rc vendor/etc/init/init.fpsgo.rc -vendor/etc/init/vendor.mediatek.hardware.mtkpower@1.0-init.rc -vendor/etc/init/vendor.mediatek.hardware.mtkpower@1.0-service.rc --vendor/etc/vintf/manifest/power-default.xml:vendor/etc/vintf/manifest/power-mtk.xml -vendor/lib/hw/power.default.so:vendor/lib/hw/power.mt6789.so -vendor/lib/hw/vendor.mediatek.hardware.mtkpower@1.2-impl.so -vendor/lib/libperfctl_vendor.so vendor/lib/libpower_timer.so -vendor/lib/libpowerhal.so -vendor/lib/libpowerhalwrap_vendor.so -vendor/lib/libmtkperf_client_vendor.so vendor/lib/vendor.mediatek.hardware.power@2.0.so -vendor/lib64/hw/power.default.so:vendor/lib64/hw/power.mt6789.so -vendor/lib64/hw/vendor.mediatek.hardware.mtkpower@1.2-impl.so -vendor/lib64/android.hardware.power-service-mediatek.so -vendor/lib64/libperfctl_vendor.so vendor/lib64/libpower_timer.so -vendor/lib64/libpowerhal.so -vendor/lib64/libpowerhalwrap_vendor.so -vendor/lib64/libmtkperf_client_vendor.so vendor/lib64/libtranlog.so vendor/lib64/vendor.mediatek.hardware.power@2.0.so