mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ANDROID: vendor_hooks: add a hook to control the delay time of frequency up and down.
balance the power and performance via the different delay time. Bug: 208722787 Signed-off-by: vincent.wang <vincent.wang@unisoc.com> Change-Id: I104a090bc697ab9c68007081e6533820364f1351
This commit is contained in:
@@ -188,6 +188,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_format_check);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_dump_buffer);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_allow_domain_state);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_map_util_freq);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_next_freq);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_report_bug);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_em_cpu_energy);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_up);
|
||||
|
||||
@@ -236,6 +236,11 @@ DECLARE_HOOK(android_vh_map_util_freq,
|
||||
bool *need_freq_update),
|
||||
TP_ARGS(util, freq, cap, next_freq, policy, need_freq_update));
|
||||
|
||||
DECLARE_HOOK(android_vh_update_next_freq,
|
||||
TP_PROTO(struct cpufreq_policy *policy, unsigned int old_next_freq,
|
||||
unsigned int *new_next_freq, s64 delta_ns),
|
||||
TP_ARGS(policy, old_next_freq, new_next_freq, delta_ns));
|
||||
|
||||
struct em_perf_domain;
|
||||
DECLARE_HOOK(android_vh_em_cpu_energy,
|
||||
TP_PROTO(struct em_perf_domain *pd,
|
||||
|
||||
@@ -104,6 +104,9 @@ static bool sugov_update_next_freq(struct sugov_policy *sg_policy, u64 time,
|
||||
unsigned int next_freq)
|
||||
{
|
||||
if (!sg_policy->need_freq_update) {
|
||||
s64 delta_ns = time - sg_policy->last_freq_update_time;
|
||||
trace_android_vh_update_next_freq(sg_policy->policy, sg_policy->next_freq,
|
||||
&next_freq, delta_ns);
|
||||
if (sg_policy->next_freq == next_freq)
|
||||
return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user