From: Bruno Martins Date: Sun, 19 May 2024 18:12:09 +0000 (+0100) Subject: g12: Use common power-libperfmgr X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=48734f297be8ed459dea5f78a46f23bd9546f4a3;p=GitHub%2FLineageOS%2FG12%2Fandroid_device_amlogic_g12-common.git g12: Use common power-libperfmgr Change-Id: I7cc2a5ec484b9e7e733131f41004a1646b661aa7 --- diff --git a/configs/powerhint.json b/configs/powerhint.json new file mode 100644 index 0000000..a06f778 --- /dev/null +++ b/configs/powerhint.json @@ -0,0 +1,54 @@ +{ + "Nodes": [ + { + "Name": "INTERACTIVE_ACTION", + "Path": "/sys/power/early_suspend_trigger", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "CPUScalingGovernor", + "Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", + "Values": [ + "interactive", + "performance" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "CPUCmd", + "Path": "/sys/class/mpgpu/mpgpucmd", + "Values": [ + " ", + "preheat" + ], + "DefaultIndex": 0, + "ResetOnInit": true + } + ], + "Actions": [ + { + "PowerHint": "INTERACTIVE", + "Node": "INTERACTIVE_ACTION", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "CPUScalingGovernor", + "Duration": 0, + "Value": "performance" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPUCmd", + "Duration": 0, + "Value": "preheat" + } + ] +} diff --git a/g12.mk b/g12.mk index 51c2055..c1baa4a 100644 --- a/g12.mk +++ b/g12.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2021-2023 The LineageOS Project +# Copyright (C) 2021-2024 The LineageOS Project # # SPDX-License-Identifier: Apache-2.0 # @@ -143,14 +143,20 @@ TARGET_AMLOGIC_SOC ?= g12a ## Power PRODUCT_PACKAGES += \ - android.hardware.power-V2-ndk_platform.vendor + android.hardware.power-service.lineage-libperfmgr + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json ## Shipping API PRODUCT_SHIPPING_API_LEVEL := 29 ## Soong namespaces PRODUCT_SOONG_NAMESPACES += \ - $(LOCAL_PATH) + $(LOCAL_PATH) \ + hardware/google/interfaces \ + hardware/google/pixel \ + hardware/lineage/interfaces/power-libperfmgr ## Thermal PRODUCT_PACKAGES += \ diff --git a/proprietary-files.txt b/proprietary-files.txt index 5722c10..b42f4be 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -128,14 +128,6 @@ vendor/lib/libomx_worker_peer_alt.so vendor/lib/libstagefrighthw.so vendor/lib/libthreadworker_alt.so -## Power -vendor/bin/hw/android.hardware.power.aidl-service.droidlogic -vendor/etc/init/android.hardware.power-service.libperfmgr.rc -vendor/etc/powerhint.json -vendor/etc/vintf/manifest/android.hardware.power-service.xml -vendor/lib/libdisppower.so -vendor/lib/libperfmgr.so - ## remotecfg vendor/bin/remotecfg vendor/etc/remote.cfg