ANDROID: thermal: Add vendor thermal_pm_notify_suspend function
Currently, most of the thermal_zones are IRQ capable and they do not need to be updated while resuming. To improve the system performance and reduce the resume time. Add a vendor function to check if the thermal_zone is not IRQ capable and needs to be updated. Bug: 170905417 Bug: 332221925 Test: boot and vendor function worked properly. Change-Id: I9389985bba29b551a7a20b55e1ed26b6c4da9b3d Signed-off-by: David Chao <davidchao@google.com> Signed-off-by: Dylan Chang <dylan.chang@nothing.tech>
This commit is contained in:
parent
5b8114ec3c
commit
353c3de3f1
@ -138,6 +138,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_oops_exit);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_size_check);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_format_check);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_dump_buffer);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_pm_notify_suspend);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_fill_prdt);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ufs_reprogram_all_keys);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ufs_complete_init);
|
||||
|
@ -1454,6 +1454,7 @@ static int thermal_pm_notify(struct notifier_block *nb,
|
||||
unsigned long mode, void *_unused)
|
||||
{
|
||||
struct thermal_zone_device *tz;
|
||||
int irq_wakeable = 0;
|
||||
|
||||
switch (mode) {
|
||||
case PM_HIBERNATION_PREPARE:
|
||||
@ -1466,6 +1467,11 @@ static int thermal_pm_notify(struct notifier_block *nb,
|
||||
case PM_POST_SUSPEND:
|
||||
atomic_set(&in_suspend, 0);
|
||||
list_for_each_entry(tz, &thermal_tz_list, node) {
|
||||
|
||||
trace_android_vh_thermal_pm_notify_suspend(tz, &irq_wakeable);
|
||||
if (irq_wakeable)
|
||||
continue;
|
||||
|
||||
thermal_zone_device_init(tz);
|
||||
thermal_zone_device_update(tz,
|
||||
THERMAL_EVENT_UNSPECIFIED);
|
||||
|
Loading…
Reference in New Issue
Block a user