Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22f2bdbe authored by Praveen Chidambaram's avatar Praveen Chidambaram Committed by Karthik Parsha
Browse files

msm-core: Set up thresholds only until the hotplug temperature point



Currently, we set up thermal thresholds to notify of every 5C rise in
temperature in the positive direction, to help recalculate energy
values. When temperatures ramp quickly, setting up additional thresholds
for EA, seems to interfere with the ability of the thermal sensor
framework to quickly notify the thermal mitigation handlers of the high
temperature, preventing hotplug of the thermally sensitive core.

Fix this by allowing thersholds to be set only until the operating range
of the cpu.

CRs-Fixed: 765104
Change-Id: I68ddc73a707ecf9e42b40f21f6ab70f1d2008771
Signed-off-by: default avatarPraveen Chidambaram <pchidamb@codeaurora.org>
parent 29561e63
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@

#define TEMP_BASE_POINT 35
#define TEMP_MAX_POINT 95
#define CPU_HOTPLUG_LIMIT 80
#define CPU_BIT_MASK(cpu) BIT(cpu)
#define DEFAULT_TEMP 40
#define DEFAULT_LOW_HYST_TEMP 10
@@ -145,6 +146,12 @@ static void set_threshold(struct cpu_activity_info *cpu_node)
	if (cpu_node->sensor_id < 0)
		return;

	/*
	 * Set the threshold only if we are below the hotplug limit
	 * Adding more work at this high temperature range, seems to
	 * fail hotplug notifications.
	 */
	if (cpu_node->hi_threshold.temp < CPU_HOTPLUG_LIMIT)
		set_and_activate_threshold(cpu_node->sensor_id,
			&cpu_node->hi_threshold);