From 00f64bf09ba6ac63a3f780dd0326416ba3a16558 Mon Sep 17 00:00:00 2001 From: Dmitry Skiba Date: Wed, 27 Nov 2024 19:15:44 +0000 Subject: [PATCH] Add a way to disable auto prefer fit for launch. This change introduces "is APF enabled" system properties, and uses them as trigger conditions for APF nodes / pre-APF nodes. By default APF nodes are active, and pre-APF nodes are inactive, which maintains the situation before this change. A future experiment will flip "is APF enabled" system properties, deactivating APF nodes and activating pre-APF nodes. For more info see go/pixel-perf-apf-experiment. Bug: 365855872 Test: set vendor.powerhal.apf_enabled=false, vendor.powerhal.apf_disabled=true, observe auto_prefer_fit procfs value is never "1" Flag: NONE powerhint change does not support flags Change-Id: I919ad3ffe5f496df75bcb492bd3b4fa2285df65c Signed-off-by: Dmitry Skiba --- device-tegu.mk | 5 +++++ perf/powerhint-tegu.json | 36 ++++++++++++++++++++++++++++-------- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/device-tegu.mk b/device-tegu.mk index 1918762..9f0801b 100644 --- a/device-tegu.mk +++ b/device-tegu.mk @@ -437,6 +437,11 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/tegu/bluetooth/audio_set_configurations.json:$(TARGET_COPY_OUT_VENDOR)/etc/aidl/le_audio/aidl_audio_set_configurations.json +# Enable APF by default +PRODUCT_VENDOR_PROPERTIES += \ + vendor.powerhal.apf_disabled=false \ + vendor.powerhal.apf_enabled=true + #Component Override for Pixel Troubleshooting App PRODUCT_COPY_FILES += \ device/google/tegu/tegu-component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/tegu-component-overrides.xml diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index 5755b88..c3a80b8 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -1088,6 +1088,13 @@ "Duration": 5000, "Value": "512" }, + { + "PowerHint": "LAUNCH", + "Node": "TAUClampBoost", + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "FGUClampBoost", @@ -1162,7 +1169,8 @@ "PowerHint": "LAUNCH", "Node": "TAAutoPreferFit", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -1170,35 +1178,47 @@ "Duration": 5000, "Value": "0xff" }, + { + "PowerHint": "LAUNCH", + "Node": "TAPreferredIdleMaskMid", + "Duration": 5000, + "Value": "0xff", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceEnable", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighValue", - "Duration": 5000, - "Value": "765" + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighPrio", "Duration": 5000, - "Value": "110" + "Value": "110", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidValue", - "Duration": 5000, - "Value": "590" + "Duration": 5000, + "Value": "590", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidPrio", "Duration": 5000, - "Value": "139" + "Value": "139", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH",