Limit camera daemon cpuset to little cores when app launch

When exiting camera app, camera daemon is still busy in background,
which may affect the launch animation of launcher. So, limit the cpuset
of camera daemon to little cores for 1 second when there is app launch
hint to improve it. This only happens when camera is running. Also bypass this behavior when video recording is active.

Bug: 240889279
Test: camera daemon cpuset changed as expected
Change-Id: I130b1e4718f8e5ef47ad761a2a73d86697d0f8bc
This commit is contained in:
Rick Yiu 2022-09-13 07:13:32 +00:00
parent a487474608
commit b05312f680

View file

@ -214,6 +214,7 @@
"Name": "CDCpuset",
"Path": "/dev/cpuset/camera-daemon/cpus",
"Values": [
"0-3",
"4-7",
"0-7"
],
@ -223,6 +224,7 @@
"Name": "CDHighCpusetCpus",
"Path": "/dev/cpuset/camera-daemon-high-group/cpus",
"Values": [
"0-3",
"6-7",
"0-7"
],
@ -232,6 +234,7 @@
"Name": "CDMidCpusetCpus",
"Path": "/dev/cpuset/camera-daemon-mid-group/cpus",
"Values": [
"0-3",
"4-5",
"0-7"
],
@ -241,6 +244,7 @@
"Name": "CDMidHighCpusetCpus",
"Path": "/dev/cpuset/camera-daemon-mid-high-group/cpus",
"Values": [
"0-3",
"4-7",
"0-7"
],
@ -319,6 +323,16 @@
],
"Type": "Property"
},
{
"Name": "PowerHALCameraRunning",
"Path": "vendor.powerhal.camerarunning",
"Values": [
"1",
"0"
],
"Type": "Property",
"ResetOnInit": true
},
{
"Name": "INTCAMFreq",
"Path": "/sys/devices/platform/17000030.devfreq_intcam/devfreq/17000030.devfreq_intcam/min_freq",
@ -513,6 +527,30 @@
}
],
"Actions": [
{
"PowerHint": "CDCPUSET_RESTRICTED",
"Node": "CDCpuset",
"Duration": 1000,
"Value": "0-3"
},
{
"PowerHint": "CDHIGHCPUSETCPUS_RESTRICTED",
"Node": "CDHighCpusetCpus",
"Duration": 1000,
"Value": "0-3"
},
{
"PowerHint": "CDMIDCPUSETCPUS_RESTRICTED",
"Node": "CDMidCpusetCpus",
"Duration": 1000,
"Value": "0-3"
},
{
"PowerHint": "CDMIDHIGHCPUSETCPUS_RESTRICTED",
"Node": "CDMidHighCpusetCpus",
"Duration": 1000,
"Value": "0-3"
},
{
"PowerHint": "LAUNCH",
"Node": "UClampThreshold",
@ -573,6 +611,30 @@
"Duration": 5000,
"Value": "0"
},
{
"PowerHint": "LAUNCH",
"Type": "DoHint",
"EnableProperty": "vendor.powerhal.camerarunning",
"Value": "CDCPUSET_RESTRICTED"
},
{
"PowerHint": "LAUNCH",
"Type": "DoHint",
"EnableProperty": "vendor.powerhal.camerarunning",
"Value": "CDHIGHCPUSETCPUS_RESTRICTED"
},
{
"PowerHint": "LAUNCH",
"Type": "DoHint",
"EnableProperty": "vendor.powerhal.camerarunning",
"Value": "CDMIDCPUSETCPUS_RESTRICTED"
},
{
"PowerHint": "LAUNCH",
"Type": "DoHint",
"EnableProperty": "vendor.powerhal.camerarunning",
"Value": "CDMIDHIGHCPUSETCPUS_RESTRICTED"
},
{
"PowerHint": "CAMERA_LAUNCH",
"Node": "MemFreq",
@ -843,6 +905,12 @@
"Duration": 3000,
"Value": "848000"
},
{
"PowerHint": "CAMERA_STREAMING_EXTREME",
"Node": "PowerHALCameraRunning",
"Duration": 0,
"Value": "1"
},
{
"PowerHint": "CAMERA_STREAMING_EXTREME",
"Node": "CPULittleClusterMaxFreq",
@ -915,6 +983,12 @@
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "PowerHALCameraRunning",
"Duration": 0,
"Value": "1"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "CPUUtilThreshold",
@ -993,6 +1067,12 @@
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "PowerHALCameraRunning",
"Duration": 0,
"Value": "1"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CDPreferHighCap",
@ -1059,6 +1139,12 @@
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "CAMERA_STREAMING_LOW",
"Node": "PowerHALCameraRunning",
"Duration": 0,
"Value": "1"
},
{
"PowerHint": "CAMERA_STREAMING_LOW",
"Node": "CDPreferHighCap",
@ -1131,6 +1217,26 @@
"Duration": 0,
"Value": "0"
},
{
"PowerHint": "CAMERA_VIDEO_RECORDING",
"Type": "MaskHint",
"Value": "CDCPUSET_RESTRICTED"
},
{
"PowerHint": "CAMERA_VIDEO_RECORDING",
"Type": "MaskHint",
"Value": "CDHIGHCPUSETCPUS_RESTRICTED"
},
{
"PowerHint": "CAMERA_VIDEO_RECORDING",
"Type": "MaskHint",
"Value": "CDMIDCPUSETCPUS_RESTRICTED"
},
{
"PowerHint": "CAMERA_VIDEO_RECORDING",
"Type": "MaskHint",
"Value": "CDMIDHIGHCPUSETCPUS_RESTRICTED"
},
{
"PowerHint": "CAMERA_GPU_HIGH",
"Node": "GPUMinFreq",