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

Commit 6f259226 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 3e1dab59 22f2bdbe
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);