From 5edd757a24b21fe127aff3e4f77d1fc5a711d90c Mon Sep 17 00:00:00 2001 From: Matthew Markwell Date: Wed, 30 Jun 2021 17:17:04 -0700 Subject: [PATCH] Adding a power hint for face unlock. During Tuscany runs, the Camera HAL is requesting a CAMERA_LAUNCH power hint, which runs big and small CPU clusters at FMAX for 1 second. This is overkill for Tuscany, so we are requesting that the hint be removed. Tuscany should only boost during the computationally expensive image processing, and should stop boosting as soon as a decision is reached. This CL adds a new power hint for Tuscany. The other CLs in this topic use this hint to boost CPU frequency during the critical section of Tuscany by adding a call from the FaceHAL to the PowerHAL. Running camera open and camera close without CAMERA_LAUNCH hint saves a measured ~1W of power. The common case for this boost in Tuscany will be a few frames at ~60ms per frame, so much less than 1 second of boost. The worst case scenario is falsing - no attempted unlock. We will allow the hint to time out after 1 second in that case, but that case is less common. Measured latency improvement per-frame from running the CPU at FMAX is ~15ms per frame. Power measurements can be found at go/tuscany-power. NOTE: This change will _reduce_ the power/battery impact of Tuscany by boosting for a more precise window of time. Bug: 190755782 Test: E2E testing, validating frequency in systrace. Change-Id: Ibca2687d2dffa4e3d2d23a9a588a2eae0b225952 --- powerhint.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/powerhint.json b/powerhint.json index 1324714d..a174af87 100644 --- a/powerhint.json +++ b/powerhint.json @@ -926,6 +926,18 @@ "Duration": 0, "Value": "60000" }, + { + "PowerHint": "FACE_UNLOCK_BOOST", + "Node": "CPUBigClusterMaxFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "FACE_UNLOCK_BOOST", + "Node": "CPUBigClusterMinFreq", + "Duration": 1000, + "Value": "9999999" + }, { "PowerHint": "FP_BOOST", "Node": "CPUBigClusterMaxFreq",