From e895392c2784ef1cce36f7c344dff67c2a148484 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 29 Apr 2021 14:08:24 -0700 Subject: [PATCH] Update power hint for camera workload 1) Enable prefer_high_cap_enable 2) Set high_capacity_start_cpu to 4 3) Set cpu.uclamp.latency_sensitive to 0 4) Change camera-daemon/cpu.uclamp.latency_sensitive owner to root Bug: 186564130 Test: Boot & check setting values Signed-off-by: Wei Wang Change-Id: I4ea14e82bf65f72a1113359cd163230a767e816b --- conf/init.gs101.rc | 2 +- powerhint.json | 48 ++++++++++++++++++++++++++++++++++++++++++++++ task_profiles.json | 9 --------- 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/conf/init.gs101.rc b/conf/init.gs101.rc index 51f49c0e..368cdd68 100644 --- a/conf/init.gs101.rc +++ b/conf/init.gs101.rc @@ -120,7 +120,7 @@ on init # change permissions and default values for camera-daemon cpu controller chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.min chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.max - chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive + chown root root /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive chown system system /dev/cpuctl/camera-daemon/cgroup.procs write /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive 1 write /dev/cpuctl/camera-daemon/cpu.uclamp.min 1 diff --git a/powerhint.json b/powerhint.json index 2db4c562..d004972b 100644 --- a/powerhint.json +++ b/powerhint.json @@ -105,6 +105,15 @@ "DefaultIndex": 0, "ResetOnInit": true }, + { + "Name": "CDLatencySensitive", + "Path": "/dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive", + "Values": [ + "0", + "1" + ], + "ResetOnInit": true + }, { "Name": "F2fsRecessModeEnable", "Path": "/dev/sys/fs/by-name/userdata/gc_urgent", @@ -123,6 +132,15 @@ ], "ResetOnInit": true }, + { + "Name": "HighCapacityStartCpu", + "Path": "/sys/kernel/vendor_sched/high_capacity_start_cpu", + "Values": [ + "4", + "6" + ], + "ResetOnInit": true + }, { "Name": "LimitFlashCurrent", "Path": "vendor.camera.max_flash_current", @@ -316,6 +334,18 @@ "Duration": 0, "Value": "1826000" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "PreferHighCapEnable", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "HighCapacityStartCpu", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPULittleClusterMaxFreq", @@ -334,6 +364,24 @@ "Duration": 0, "Value": "20 10 80" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "PreferHighCapEnable", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "HighCapacityStartCpu", + "Duration": 0, + "Value": "4" + }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "CDLatencySensitive", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CPUBigClusterMaxFreq", diff --git a/task_profiles.json b/task_profiles.json index 1e8def09..f8c7e53e 100644 --- a/task_profiles.json +++ b/task_profiles.json @@ -10,15 +10,6 @@ "Controller": "cpu", "Path": "top-app" } - }, - { - "Name": "WriteFile", - "Params": - { - "FilePath": "/sys/kernel/vendor_sched/set_prefer_high_cap", - "Value": "", - "LogFailures": "false" - } } ] },