Skip to content
Commit a26de34b authored by Ye Zhang's avatar Ye Zhang Committed by Rafael J. Wysocki
Browse files

thermal: devfreq_cooling: Fix perf state when calculate dfc res_util



The issue occurs when the devfreq cooling device uses the EM power model
and the get_real_power() callback is provided by the driver.

The EM power table is sorted ascending,can't index the table by cooling
device state,so convert cooling state to performance state by
dfc->max_state - dfc->capped_state.

Fixes: 615510fe ("thermal: devfreq_cooling: remove old power model and use EM")
Cc: 5.11+ <stable@vger.kernel.org> # 5.11+
Signed-off-by: default avatarYe Zhang <ye.zhang@rock-chips.com>
Reviewed-by: default avatarDhruva Gole <d-gole@ti.com>
Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent f67cf45d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment