diff --git a/conf/init.pantah.rc b/conf/init.pantah.rc index 1abbf21..b087d95 100644 --- a/conf/init.pantah.rc +++ b/conf/init.pantah.rc @@ -117,3 +117,11 @@ on property:vendor.device.modules.ready=1 chown system system /proc/focaltech_touch/selftest/Scap_Rawdata chown system system /proc/focaltech_touch/selftest/Short chown system system /proc/focaltech_touch/selftest/Strength + +# Override SF and RE uclamps to 0 on boot after being set elsewhere, for adpf cpu hints +on property:sys.boot_completed=1 + trigger override-sf-uclamp + +on override-sf-uclamp + write /proc/vendor_sched/rt_uclamp_min 0 + write /proc/vendor_sched/sf_uclamp_min 0 diff --git a/device-cheetah.mk b/device-cheetah.mk index 84af1e1..e153cac 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -331,3 +331,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Device features PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml + +# Enable adpf cpu hint session for SurfaceFlinger +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ + debug.sf.enable_adpf_cpu_hint=true diff --git a/device-panther.mk b/device-panther.mk index 37c438d..cef2824 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -317,3 +317,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Device features PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml + +# Enable adpf cpu hint session for SurfaceFlinger +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ + debug.sf.enable_adpf_cpu_hint=true diff --git a/powerhint-cheetah-a0.json b/powerhint-cheetah-a0.json index 79588d9..ec24509 100644 --- a/powerhint-cheetah-a0.json +++ b/powerhint-cheetah-a0.json @@ -162,16 +162,6 @@ ], "ResetOnInit": true }, - { - "Name": "SFUClampBoost", - "Path": "/proc/vendor_sched/sf_uclamp_min", - "Values": [ - "159", - "85", - "39" - ], - "ResetOnInit": true - }, { "Name": "MLUclampBoost", "Path": "/proc/vendor_sched/nnapi_uclamp_min", @@ -530,18 +520,6 @@ } ], "Actions": [ - { - "PowerHint": "INTERACTION", - "Node": "SFUClampBoost", - "Duration": 5000, - "Value": "85" - }, - { - "PowerHint": "LAUNCH_120FPS", - "Node": "SFUClampBoost", - "Duration": 1000, - "Value": "159" - }, { "PowerHint": "LAUNCH", "Node": "FGPreferIdle", @@ -553,12 +531,6 @@ "Type": "DoHint", "Value": "LAUNCH_120FPS" }, - { - "PowerHint": "LAUNCH", - "Node": "SFUClampBoost", - "Duration": 5000, - "Value": "85" - }, { "PowerHint": "LAUNCH", "Node": "CPUBigClusterMaxFreq", diff --git a/powerhint-cheetah.json b/powerhint-cheetah.json index a42dc48..772b4e8 100644 --- a/powerhint-cheetah.json +++ b/powerhint-cheetah.json @@ -188,16 +188,6 @@ ], "ResetOnInit": true }, - { - "Name": "SFUClampBoost", - "Path": "/proc/vendor_sched/sf_uclamp_min", - "Values": [ - "159", - "85", - "39" - ], - "ResetOnInit": true - }, { "Name": "MLUclampBoost", "Path": "/proc/vendor_sched/nnapi_uclamp_min", @@ -536,12 +526,6 @@ } ], "Actions": [ - { - "PowerHint": "INTERACTION", - "Node": "SFUClampBoost", - "Duration": 5000, - "Value": "85" - }, { "PowerHint": "LAUNCH", "Node": "UClampThreshold", @@ -560,12 +544,6 @@ "Duration": 1000, "Value": "10" }, - { - "PowerHint": "LAUNCH_120FPS", - "Node": "SFUClampBoost", - "Duration": 1000, - "Value": "159" - }, { "PowerHint": "LAUNCH", "Node": "FGPreferIdle", @@ -582,12 +560,6 @@ "Type": "DoHint", "Value": "LAUNCH_GPU" }, - { - "PowerHint": "LAUNCH", - "Node": "SFUClampBoost", - "Duration": 5000, - "Value": "85" - }, { "PowerHint": "LAUNCH", "Node": "CPUBigClusterMaxFreq", diff --git a/powerhint-panther-a0.json b/powerhint-panther-a0.json index 98883cb..f26e9be 100644 --- a/powerhint-panther-a0.json +++ b/powerhint-panther-a0.json @@ -151,16 +151,6 @@ ], "ResetOnInit": true }, - { - "Name": "SFUClampBoost", - "Path": "/proc/vendor_sched/sf_uclamp_min", - "Values": [ - "159", - "85", - "39" - ], - "ResetOnInit": true - }, { "Name": "MLUclampBoost", "Path": "/proc/vendor_sched/nnapi_uclamp_min", @@ -519,24 +509,12 @@ } ], "Actions": [ - { - "PowerHint": "INTERACTION", - "Node": "SFUClampBoost", - "Duration": 5000, - "Value": "85" - }, { "PowerHint": "LAUNCH", "Node": "FGPreferIdle", "Duration": 5000, "Value": "1" }, - { - "PowerHint": "LAUNCH", - "Node": "SFUClampBoost", - "Duration": 5000, - "Value": "85" - }, { "PowerHint": "LAUNCH", "Node": "CPUBigClusterMaxFreq", diff --git a/powerhint-panther.json b/powerhint-panther.json index 800376c..e037835 100644 --- a/powerhint-panther.json +++ b/powerhint-panther.json @@ -168,16 +168,6 @@ ], "ResetOnInit": true }, - { - "Name": "SFUClampBoost", - "Path": "/proc/vendor_sched/sf_uclamp_min", - "Values": [ - "159", - "85", - "39" - ], - "ResetOnInit": true - }, { "Name": "MLUclampBoost", "Path": "/proc/vendor_sched/nnapi_uclamp_min", @@ -516,12 +506,6 @@ } ], "Actions": [ - { - "PowerHint": "INTERACTION", - "Node": "SFUClampBoost", - "Duration": 5000, - "Value": "85" - }, { "PowerHint": "LAUNCH", "Node": "UClampThreshold", @@ -540,12 +524,6 @@ "Duration": 5000, "Value": "1" }, - { - "PowerHint": "LAUNCH", - "Node": "SFUClampBoost", - "Duration": 5000, - "Value": "85" - }, { "PowerHint": "LAUNCH", "Node": "CPUBigClusterMaxFreq",