]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
thermal: gov_power_allocator: Allow binding without trip points
authorNikita Travkin <nikita@trvn.ru>
Wed, 3 Apr 2024 11:31:41 +0000 (16:31 +0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:38:13 +0000 (16:38 +0200)
commita8235110cb6e669eec6f2e74572fd421f9ab614b
tree7be0d83d6803f1743d2a49f2299a90951bda5b4b
parent626bd679369458eac63b0a8a929fafc00d1cf9df
thermal: gov_power_allocator: Allow binding without trip points

[ Upstream commit da781936e7c301e6197eb6513775748e79fb2575 ]

IPA probe function was recently refactored to perform extra error checks
and make sure the thermal zone has trip points necessary for the IPA
operation. With this change, if a thermal zone is probed such that it
has no trip points that IPA can use, IPA will fail and the TZ won't be
created. This is the case if a platform defines a TZ without cooling
devices and only with "hot"/"critical" trip points, often found on some
Qualcomm devices [1].

Documentation across IPA code (notably get_governor_trips() kerneldoc)
suggests that IPA is supposed to handle such TZ even if it won't
actually do anything.

This commit partially reverts the previous change to allow IPA to bind
to such "empty" thermal zones.

Fixes: e83747c2f8e3 ("thermal: gov_power_allocator: Set up trip points earlier")
Link: arch/arm64/boot/dts/qcom/sc7180.dtsi#n4776 # [1]
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/gov_power_allocator.c