mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-08 18:35:20 +02:00
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: 336965830 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 353c3de3f112132e10d8649a97f0a03fad28c745)
This commit is contained in:
parent
8f1ee645c2
commit
12b275d2f9
|
@ -129,6 +129,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpu_cgroup_online);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_meminfo_cache_adjust);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_mem_available_adjust);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_meminfo_adjust);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_pm_notify_suspend);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_fill_prdt);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_prepare_command);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_update_sysfs);
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/suspend.h>
|
||||
|
||||
#include <trace/hooks/thermal.h>
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "thermal_trace.h"
|
||||
|
||||
|
@ -1525,6 +1527,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:
|
||||
|
@ -1552,6 +1555,10 @@ static int thermal_pm_notify(struct notifier_block *nb,
|
|||
|
||||
tz->suspended = false;
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -14,6 +14,11 @@ DECLARE_HOOK(android_vh_disable_thermal_cooling_stats,
|
|||
TP_PROTO(struct thermal_cooling_device *cdev, bool *disable_stats),
|
||||
TP_ARGS(cdev, disable_stats));
|
||||
|
||||
struct thermal_zone_device;
|
||||
DECLARE_HOOK(android_vh_thermal_pm_notify_suspend,
|
||||
TP_PROTO(struct thermal_zone_device *tz, int *irq_wakeable),
|
||||
TP_ARGS(tz, irq_wakeable));
|
||||
|
||||
#endif /* _TRACE_HOOK_THERMAL_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
|
Loading…
Reference in New Issue
Block a user