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: 336700210
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>
(cherry picked from commit 353c3de3f1
)
This commit is contained in:
parent
6dde3d399b
commit
33d546a1e1
@ -136,6 +136,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