From 2abc122f8854858a3da88161b749cab3f6586215 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. 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 63321995..d0797e3c 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", @@ -491,6 +500,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", @@ -545,6 +566,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",