summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>2018-03-09 16:59:26 +0530
committerManaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>2018-03-28 18:22:38 +0530
commit255ce53eb8945888a241d2bba2d371071a4af9dc (patch)
tree8af08f6d49cfcded39cf4dbbe54d6befdd918fae
parentde111ce20e214694791b10a106f6910f440fec4c (diff)
msm: thermal: Initialize KTM interrupt mode at kernel late init level
KTM prolong KTM hotplug mitigation, cpu frequency mitigation etc. till thermal-engine takes over. It is helping thermal runaway issues during the boot time from KTM kernel late init level to thermal-engine starts. Since BCL is also using KTM interface for mitigation, it delays BCL mitigation till thermal-engine starts. Again target which has LMH support enables Tj based mitigation very early in the boot. So there is no risk of thermal runaway issues mentioned above. Enable KTM interrupt mode mitigation back from kernel late init itself. This reverts commit <07f3dcfc7f7c> ("msm: thermal: Prolong KTM mitigation till thermal-engine takesover"). Change-Id: I7e4beaed2dd003c6ed36cc10e4bf003826fad827 Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
-rw-r--r--drivers/thermal/msm_thermal.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/thermal/msm_thermal.c b/drivers/thermal/msm_thermal.c
index bca85bf2f7ec..bd1d208626db 100644
--- a/drivers/thermal/msm_thermal.c
+++ b/drivers/thermal/msm_thermal.c
@@ -188,6 +188,7 @@ static bool ocr_nodes_called;
static bool ocr_probed;
static bool ocr_reg_init_defer;
static bool hotplug_enabled;
+static bool interrupt_mode_enable;
static bool msm_thermal_probed;
static bool gfx_crit_phase_ctrl_enabled;
static bool gfx_warm_phase_ctrl_enabled;
@@ -4919,9 +4920,10 @@ static void __ref disable_msm_thermal(void)
static void interrupt_mode_init(void)
{
- if (!msm_thermal_probed)
+ if (!msm_thermal_probed) {
+ interrupt_mode_enable = true;
return;
-
+ }
if (polling_enabled) {
polling_enabled = 0;
create_sensor_zone_id_map();
@@ -7434,6 +7436,10 @@ static int msm_thermal_dev_probe(struct platform_device *pdev)
if (ret)
goto probe_exit;
msm_thermal_probed = true;
+ if (interrupt_mode_enable) {
+ interrupt_mode_init();
+ interrupt_mode_enable = false;
+ }
probe_exit:
return ret;
@@ -7570,6 +7576,7 @@ int __init msm_thermal_late_init(void)
}
}
msm_thermal_add_mx_nodes();
+ interrupt_mode_init();
create_cpu_topology_sysfs();
create_thermal_debugfs();
msm_thermal_add_bucket_info_nodes();