From fe6cf44ff3d6e9f8b936cbb4be998954caf4f2be Mon Sep 17 00:00:00 2001 From: Peter Liu Date: Wed, 9 Jun 2021 21:31:31 -0700 Subject: [PATCH] camera power hint: add prefer high cap and prefer idle = 0 to top app Prefer high cap and prefer idle is to optimize power and trade off with scheduling latency. Applying to app side does has no regression on frame drops. And we can not apply prefer idle to hal process as it impact performance. (cherry-pick from device/google/gs101) Bug: 205010238 Bug: 190127212 Test: 1080p60: 20mW power saving, 59fps no regression slow-mo 240fps: 239+fps Change-Id: I548becbd2d6ccac8b576cfe54f9021bbf30b4801 --- powerhint.json | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/powerhint.json b/powerhint.json index 7a33c0dc..5493816a 100644 --- a/powerhint.json +++ b/powerhint.json @@ -144,6 +144,15 @@ ], "ResetOnInit": true }, + { + "Name": "TAPreferIdle", + "Path": "/sys/kernel/vendor_sched/ta_prefer_idle", + "Values": [ + "0", + "1" + ], + "ResetOnInit": true + }, { "Name": "CDPreferHighCap", "Path": "/sys/kernel/vendor_sched/cam_prefer_high_cap", @@ -441,6 +450,18 @@ "Duration": 0, "Value": "20 10 80" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "TAPreferHighCap", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "TAPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPUUtilThreshold", @@ -495,6 +516,18 @@ "Duration": 0, "Value": "20 10 80" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "TAPreferHighCap", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "TAPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CDPreferHighCap",