g12: Use common power-libperfmgr
authorBruno Martins <bgcngm@gmail.com>
Sun, 19 May 2024 18:12:09 +0000 (19:12 +0100)
committerNolen Johnson <johnsonnolen@gmail.com>
Fri, 21 Jun 2024 03:52:09 +0000 (23:52 -0400)
Change-Id: I7cc2a5ec484b9e7e733131f41004a1646b661aa7

configs/powerhint.json [new file with mode: 0644]
g12.mk
proprietary-files.txt

diff --git a/configs/powerhint.json b/configs/powerhint.json
new file mode 100644 (file)
index 0000000..a06f778
--- /dev/null
@@ -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 51c2055a78ec4954f4896724165637b3ce00482f..c1baa4a114884f0782ba74437acb759d384353d2 100644 (file)
--- 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 += \
index 5722c10a6b69e765f3409705cddd0e4ded2fcb98..b42f4be5317bc4a15c4908322cd7cceca273b477 100644 (file)
@@ -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