* QTI Thermal couldn't read the temperature for some reason
* sepolicy: Adjust sepolicy for thermal
Change-Id: Idea1bcdea070913ef35b699fafd1242d740453a9
Currently, all sessions get boosted any time DISPLAY_UPDATE_IMMINENT is
sent from SurfaceFlinger which can lead to large, unnecessary boosts.
This patch aims to change that by removing the wakeup behavior, relying
instead on sessions to boost themselves with new load change hints.
* Remove wakeup() from PowerHintSession
* Remove wakeSessions from PowerSessionManager
* Remove related timers and message handlers
* Remove DISPLAY_UPDATE_IMMINENT behavior entirely
Test: manual
Bug: b/260136431
Change-Id: I4610edfefe8fcbef7d4cdbf5768830a9392a54f7
Reset traced hint value to -1 on reportActualWorkDuration or stale
timeout, and rewrite existing tracing for readability.
Bug: b/243973548
Test: manual
Change-Id: I135ec5f8971a9902d880e4089b0df746f5b917e2
To send ADPF_FIRST_FRAME hint when reportWorkDurations was called first
time after stale state.
Bug: 243025173
Test: PtsUiBench & CUJ
Change-Id: I4377b1f549646bcf44bdf26b2657b7bc0646f9a4
Merged-In: I4377b1f549646bcf44bdf26b2657b7bc0646f9a4
Send a hint only when the system can support the hint.
Bug: 243025173
Test: PtsUiBench & CUJ
Change-Id: If56d0c22f8dd61f5fe27ba79f08f2963269abe41
Merged-In: If56d0c22f8dd61f5fe27ba79f08f2963269abe41
These don't affect performance, so we don't need to disable them
for battery saver or sustained performance mode.
Change-Id: I483d7fa6d0067f21d46b6811ba324793415218c7
* when tested with [1], even after exiting the app, spm was
still active in powerhal thereby keeping max freqs limited
and blocking boosts
* enable/disable it properly and end all other hints before
enabling, to fix this issue
* while we're at it, don't handle max freq for anything other
than spm in powerhint
[1] https://android.googlesource.com/platform/cts/+/refs/heads/master/hostsidetests/sustainedperf
Change-Id: I6e37dfa7ffab0137d70cb5ba5d1b156133416062
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
* end all running boosts when battery saver is turned on,
and block all boosts until its turned off
Change-Id: I6793d694747c27591e69594d9d46da3490673d63
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Makes sure rendering has enough capacity.
Change-Id: I7ad051248353485a8090bec578b2c4325ea06024
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Matches SF, makes sure rendering always
has enough capacity.
Also switches to task_profiles.
Change-Id: I2a2de504be7d3f4f66f31445f44fbbf9376bd927
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
* Greatly affects the performance/latency of the display
considering you have foreground set to 0-6 cores on <SM7350
whilst being power efficient.
* This shows an improvement on HWUI graph and even jankbench.
Change-Id: I6438375d844e1b1f38872fb53bdfadfb644fc722
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.
Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
- Make use of uclamp boost for top-app and foreground
hints based on newer pixels
Co-authored-by: Vivekachooz <vivekachooz@gmail.com>
Change-Id: I70c4262230841b3c7bf84b4165916a22312f829f
Fix for:
W libperfmgr: Failed to write to node: /dev/stune/top-app/schedtune.boost with value: 10, fd: -1
Change-Id: I1e394919b75e192def99c444993546634c951781
* proprietary perfd blobs can finally be nuked without breaking goodix
* we could even map the functions to use libperfmgr powerhints in the future
Change-Id: I124652f3041761966a3e3bd97c757fecc39cc5fb
The main problem is the timer thread could be woken after the session
was destroyed. We did have a closed flag which was set in destructor and the flag would be checked before handleMessage accessing the session
instance. To fix the problem, the operations of flag checking and session instance accessing should be guarded by the lock.
Bug: 236674672
Test: manual test
Change-Id: I49a18efbc135b1bc070b101038a8a0bcc6e19fec
(cherry picked from commit 5c75978f530b27bd976d8695ed79acd336c24776)
Merged-In: I49a18efbc135b1bc070b101038a8a0bcc6e19fec
Optimize boost:
A more efficient way is to trigger the wakeup boost through mTidSessionListMap, so the time
complexity reduce from O(n^3) to O(n^2).
The original code path:
PSM:wakeSessions() contains a loop that is O(n),
inside the loop, it calls to PHS::wakeup() which call to
PSM::setUclampMinLocked(), and
PSM::setUclampMinLocked() contains two loops O(n^2)
The new code path:
PSM::wakeSessions() directly checks all the ADPF tasks O(n) and
get the wakeup boost value O(n), then directly set the uclamp.min
The time complexity lower to O(n^2).
Fix unstable boost:
The original flow is to find max boost and wake it up from stale state
one by one. But the previous woken ones would not be counted when the later ones finding their max boost value.
The new flow boost all the tasks first, then wake up all those sessions.
Bug: 235510337
Test: Manually playing UIBench -> Transitions -> ActivityTransition
Change-Id: I995673b74401e198eb72188134ba1ebc134f971c
For DISPLAY_UPDATE_IMMINENT wakeup signal, non-stale
session's timer should be also extended. This resolves
the performance issue caused those sessions to go stale
prematurely.
Bug: 241621485
Test: Build
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I06330e064060248bb556ae35e0cb8fd302cef231
post the task into a looper thread.
Bug: 232992641
Test: Manually playing UIBench -> Transitions -> ActivityTransition
Change-Id: Ibd241834f904b4c87a51363e766e110d2818d496
Separate Stale and EarlyBoost handlers and refine the code.
Test: adb shell dumpsys android.hardware.power.IPower/default
Test: Manual
Bug: 232992641
Change-Id: I81a4fd96fb7311ae5bbb7cbabe72378c9cad4aa3
We need to be holding the session lock when we dereference mDescriptor
since mDescriptor is destroyed when the session is closed. This patch
takes the session lock and verifies if it's still open during wakeup.
Test: vts run -m VtsHalGraphicsComposerV2_4TargetTest
Bug: 232992641
Change-Id: I4000a85bf2932cfdcddd3006d671a3c91ed32c48
Integrate the uclamp.min across sessions.
Add UClampMininit as the display update boost
Bug: 232313238
Test: Manual test
Change-Id: I601f407b0b5383a1e39eac448d45cbaaeb7788fb
This is causing session update skipped and stuck.
Bug: 232336917
Test: /data/nativetest64/libperfmgr_test/libperfmgr_test
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: I8928b6f6a60dcf8d21e60228a74d3aa0ab792eff