From 79cd618b0828ebf8cf2515693ee0bfa2d5e0c411 Mon Sep 17 00:00:00 2001 From: Dmitry Skiba Date: Fri, 6 Dec 2024 07:43:30 +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 staying "false" and instead preferred_idle_mask_mid changing to 0x1ff during app launches Flag: NONE powerhint change does not support flags Change-Id: Iedf4e9283c2e5f20ae818abfcf475fefe953c9c8 Signed-off-by: Dmitry Skiba --- device-akita.mk | 5 +++++ powerhint-akita.json | 34 +++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/device-akita.mk b/device-akita.mk index 5851419..a5c1933 100644 --- a/device-akita.mk +++ b/device-akita.mk @@ -455,3 +455,8 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/akita/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 diff --git a/powerhint-akita.json b/powerhint-akita.json index 7f6f3f2..814dac9 100644 --- a/powerhint-akita.json +++ b/powerhint-akita.json @@ -992,6 +992,13 @@ "Duration": 5000, "Value": "615" }, + { + "PowerHint": "LAUNCH", + "Node": "TAUClampBoost", + "Duration": 5000, + "Value": "765", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH", "Node": "FGUClampBoost", @@ -1066,37 +1073,43 @@ "PowerHint": "LAUNCH", "Node": "TAAutoPreferFit", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceEnable", "Duration": 5000, - "Value": "1" + "Value": "1", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceHighValue", "Duration": 5000, - "Value": "765" + "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": "570" + "Duration": 5000, + "Value": "570", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", "Node": "TAUclampMinOnNiceMidPrio", "Duration": 5000, - "Value": "139" + "Value": "139", + "EnableProperty": "vendor.powerhal.apf_enabled" }, { "PowerHint": "LAUNCH", @@ -1188,6 +1201,13 @@ "Duration": 5000, "Value": "0x1ff" }, + { + "PowerHint": "LAUNCH", + "Node": "TAPreferredIdleMaskMid", + "Duration": 5000, + "Value": "0x1ff", + "EnableProperty": "vendor.powerhal.apf_disabled" + }, { "PowerHint": "LAUNCH_EXTEND", "Node": "FGPreferIdle",