Skip to content
Commit 4ecaa757 authored by Yu-Che Cheng's avatar Yu-Che Cheng Committed by Rafael J. Wysocki
Browse files

thermal: gov_power_allocator: Fix incorrect calculation in divvy_up_power()



divvy_up_power() should use weighted_req_power instead of req_power to
calculate granted_power. Otherwise, granted_power may be unexpected as
the denominator total_req_power is a weighted sum.

This is a mistake made during the previous refactor.

Replace req_power with weighted_req_power in divvy_up_power()
calculation.

Fixes: 912e97c6 ("thermal: gov_power_allocator: Move memory allocation out of throttle()")
Signed-off-by: default avatarYu-Che Cheng <giver@chromium.org>
Reviewed-by: Lukasz Luba's avatarLukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20250219-fix-power-allocator-calc-v1-1-48b860291919@chromium.org


[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 0ad2507d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment