ANDROID: schedutil: add vendor hook for adjusting util to freq calculation

Currently, the frequency is calculated by max freq * 1.25 * util / max cap.
Add a vendor hook to adjust the frequency when the calculation
overestimate.

android_vh_map_util_freq
	adjust util to freq calculation

Bug: 177854431

Signed-off-by: Yun Hsiang <yun.hsiang@mediatek.com>
Change-Id: I9aa9079f00af7d3380b19f2fe21b75cddd107d15
(cherry picked from commit 3122e3ec9672036384304fdeaa1b1815f60ba817)
This commit is contained in:
Yun Hsiang
2021-01-13 17:00:22 +08:00
committed by Todd Kjos
parent 88e2d5fd10
commit 11d9d07f3f
3 changed files with 13 additions and 1 deletions

View File

@@ -222,6 +222,11 @@ DECLARE_RESTRICTED_HOOK(android_rvh_sched_exec,
TP_PROTO(bool *cond),
TP_ARGS(cond), 1);
DECLARE_HOOK(android_vh_map_util_freq,
TP_PROTO(unsigned long util, unsigned long freq,
unsigned long cap, unsigned long *next_freq),
TP_ARGS(util, freq, cap, next_freq));
/* macro versions of hooks are no longer required */
#endif /* _TRACE_HOOK_SCHED_H */