summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorYu-Che Cheng <giver@chromium.org>2025-02-22 11:20:34 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-07 18:25:35 +0100
commit27a144c3be8cb7b1e6d09ae63deb9e4a241aedfe (patch)
treecd0a7f835d6e814c30bde3d510d4dd476a85dfaf /kernel
parent19cd2dc4d4c66fea1af5d95ef5b466fb792f4563 (diff)
downloadlinux-27a144c3be8cb7b1e6d09ae63deb9e4a241aedfe.tar.gz
linux-27a144c3be8cb7b1e6d09ae63deb9e4a241aedfe.tar.bz2
linux-27a144c3be8cb7b1e6d09ae63deb9e4a241aedfe.zip
thermal: gov_power_allocator: Update total_weight on bind and cdev updates
[ Upstream commit 0cde378a10c1cbfaa8dd2b89672d42f36c2809c3 ] params->total_weight is not initialized during bind and not updated when the bound cdev changes. The cooling device weight will not be used due to the uninitialized total_weight, until an update via sysfs is triggered. The bound cdevs are updated during thermal zone registration, where each cooling device will be bound to the thermal zone one by one, but power_allocator_bind() can be called without an additional cdev update when manually changing the policy of a thermal zone via sysfs. Add a new function to handle weight update logic, including updating total_weight, and call it when bind, weight changes, and cdev updates to ensure total_weight is always correct. Fixes: a3cd6db4cc2e ("thermal: gov_power_allocator: Support new update callback of weights") Signed-off-by: Yu-Che Cheng <giver@chromium.org> Link: https://patch.msgid.link/20250222-fix-power-allocator-weight-v2-1-a94de86b685a@chromium.org [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions