camera power hint: add prefer high cap in all modes

Prefer high cap will choose the mid / high cores when possible with
consideration of energy efficiency.

Running task on high cores with low clock is more efficient than running
at little core with high clock.

This hint also addresses CTS issues with keeping latency_sensitive = 1.
(equivalent to prefer idle)

This hint adds:
1) Enable prefer_high_cap of camera vendor group
2) Set high_capacity_start_cpu to 4
4) Set MemFreq floor
5) Change camera-daemon/cpu.uclamp.latency_sensitive owner to root

Bug: 186564130

Test:
android.hardware.camera2.cts.RobustnessTest#testAeAndAfCausality (5/5)
android.hardware.cts.CameraTest#testPreviewCallback (5/5)
android.hardware.camera2.cts.CameraDeviceTest#testCameraDeviceRepeatingBurst (5/5)
android.hardware.cts.CameraTest#testFocusDistances (3/6). (3/6) without CL.

*****************************************************************
              raven Camera CTS Test Results

*****************************************************************
Tests Passed: 217, Failed: 0, Not found: 0, Status unknown: 0

Change-Id: Ia2abb0eb9c57fa05c4db7bf1d02053e303301781
This commit is contained in:
Peter Liu 2021-05-19 15:13:06 -07:00
parent c36b562b57
commit 7bb4e1f1b3
2 changed files with 65 additions and 1 deletions

View file

@ -137,7 +137,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 /sys/kernel/vendor_sched/cam_prefer_idle 1

View file

@ -5,6 +5,7 @@
"Path": "/sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/min_freq",
"Values": [
"3172000",
"1014000",
"421000"
],
"ResetOnInit": true
@ -115,6 +116,15 @@
"DefaultIndex": 0,
"ResetOnInit": true
},
{
"Name": "CDPreferIdle",
"Path": "/sys/kernel/vendor_sched/cam_prefer_idle",
"Values": [
"0",
"1"
],
"ResetOnInit": true
},
{
"Name": "F2fsRecessModeEnable",
"Path": "/dev/sys/fs/by-name/userdata/gc_urgent",
@ -124,6 +134,24 @@
],
"ResetOnInit": true
},
{
"Name": "CDPreferHighCap",
"Path": "/sys/kernel/vendor_sched/cam_prefer_high_cap",
"Values": [
"1",
"0"
],
"ResetOnInit": true
},
{
"Name": "HighCapacityStartCpu",
"Path": "/sys/kernel/vendor_sched/high_capacity_start_cpu",
"Values": [
"4",
"6"
],
"ResetOnInit": true
},
{
"Name": "DisplayWakeup",
"Path": "/sys/devices/platform/1c300000.drmdecon/early_wakeup",
@ -331,6 +359,18 @@
"Duration": 0,
"Value": "1826000"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "CDPreferHighCap",
"Duration": 0,
"Value": "1"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "HighCapacityStartCpu",
"Duration": 0,
"Value": "4"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "CPULittleClusterMaxFreq",
@ -343,12 +383,30 @@
"Duration": 0,
"Value": "302000"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "MemFreq",
"Duration": 0,
"Value": "1014000"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "MIFTargetLoad",
"Duration": 0,
"Value": "20 10 80"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CDPreferHighCap",
"Duration": 0,
"Value": "1"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "HighCapacityStartCpu",
"Duration": 0,
"Value": "4"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CPUBigClusterMaxFreq",
@ -367,6 +425,12 @@
"Duration": 0,
"Value": "302000"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "MemFreq",
"Duration": 0,
"Value": "1014000"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "MIFTargetLoad",