Skip to content

Commit 92572d2

Browse files
committed
Merge tag 'thermal-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control fix from Rafael Wysocki: "Replace an earlier fix for a recent regression in the Step-Wise thermal governor that was not effective in all of the relevant cases (Rafael Wysocki)" * tag 'thermal-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: gov_step_wise: Go straight to instance->lower when mitigation is over
2 parents 0f47788 + 5290381 commit 92572d2

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

drivers/thermal/gov_step_wise.c

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ static unsigned long get_target_state(struct thermal_instance *instance,
5555
if (cur_state <= instance->lower)
5656
return THERMAL_NO_TARGET;
5757

58-
return clamp(cur_state - 1, instance->lower, instance->upper);
58+
/*
59+
* If 'throttle' is false, no mitigation is necessary, so
60+
* request the lower state for this instance.
61+
*/
62+
return instance->lower;
5963
}
6064

6165
return instance->target;
@@ -93,23 +97,6 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz,
9397
if (instance->initialized && old_target == instance->target)
9498
continue;
9599

96-
if (trip->type == THERMAL_TRIP_PASSIVE) {
97-
/*
98-
* If the target state for this thermal instance
99-
* changes from THERMAL_NO_TARGET to something else,
100-
* ensure that the zone temperature will be updated
101-
* (assuming enabled passive cooling) until it becomes
102-
* THERMAL_NO_TARGET again, or the cooling device may
103-
* not be reset to its initial state.
104-
*/
105-
if (old_target == THERMAL_NO_TARGET &&
106-
instance->target != THERMAL_NO_TARGET)
107-
tz->passive++;
108-
else if (old_target != THERMAL_NO_TARGET &&
109-
instance->target == THERMAL_NO_TARGET)
110-
tz->passive--;
111-
}
112-
113100
instance->initialized = true;
114101

115102
mutex_lock(&instance->cdev->lock);

0 commit comments

Comments
 (0)