thermal/core/power_allocator: Update once cooling devices when temp is low
authorLukasz Luba <lukasz.luba@arm.com>
Thu, 22 Apr 2021 11:43:08 +0000 (12:43 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 22 Apr 2021 21:51:14 +0000 (23:51 +0200)
commit0952177f2a1f63ba87a1940fac21768f402c0b94
tree0db46b45dc08603eae703c007e3e31414487950a
parentd3b60ed9b135e2c652115db691a87dc28b324bea
thermal/core/power_allocator: Update once cooling devices when temp is low

The cooling device state change generates an event, also when there is no
need, because temperature is low and device is not throttled. Avoid to
unnecessary update the cooling device which means also not sending event.
The cooling device state has not changed because the temperature is still
below the first activation trip point value, so we can do this.
Add a tracking mechanism to make sure it updates cooling devices only
once - when the temperature dropps below first trip point.

Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210422114308.29684-4-lukasz.luba@arm.com
drivers/thermal/gov_power_allocator.c