ANDROID: thermal: Add vendor hook to check power range

For SoC's skin temperature, we have to use more stringent temperature
control to make IPA can monitor and mitigate temperature control earlier
and faster, so add it to meet platform thermal requirement.

Bug: 211564753

Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Signed-off-by: Di Shen <di.shen@unisoc.com>
Change-Id: Iaef87287eef93d6fdbc3c58c93f70c1525e38296
(cherry picked from commit 6709f523251f77dc1e9ea643668c630db1f7db80)
This commit is contained in:
Jeson Gao 2021-12-21 16:32:42 +08:00 committed by Todd Kjos
parent 60cddd3d15
commit 97a290b0e5
3 changed files with 5 additions and 0 deletions

View File

@ -262,3 +262,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_init);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_wake);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_finished);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_rwsem_list_add);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_power_cap);

View File

@ -470,6 +470,7 @@ static int allocate_power(struct thermal_zone_device *tz,
}
power_range = pid_controller(tz, control_temp, max_allocatable_power);
trace_android_vh_thermal_power_cap(&power_range);
divvy_up_power(weighted_req_power, max_power, num_actors,
total_weighted_req_power, power_range, granted_power,

View File

@ -23,6 +23,9 @@ DECLARE_HOOK(android_vh_enable_thermal_power_throttle,
TP_PROTO(int *enable),
TP_ARGS(enable));
DECLARE_HOOK(android_vh_thermal_power_cap,
TP_PROTO(u32 *power_range),
TP_ARGS(power_range));
#endif /* _TRACE_HOOK_THERMAL_H */
/* This part must be outside protection */
#include <trace/define_trace.h>