mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
soc: rockchip: ipa: Make static coefficient more accurate when leakage is 0
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Change-Id: Ic9326b41a818b16645ba8466952376f2acd5da55
This commit is contained in:
@@ -25,9 +25,12 @@ static void calculate_static_coefficient(struct ipa_power_model_data *data)
|
||||
u32 static_coeff = data->static_coefficient;
|
||||
u32 lkg_scaling_factor;
|
||||
|
||||
/* leakage=0, use static_coefficient in devicetree */
|
||||
if (!lkg)
|
||||
return;
|
||||
if (!lkg) {
|
||||
if (ref_lkg)
|
||||
lkg = ref_lkg;
|
||||
else
|
||||
lkg = (min + max) / 2;
|
||||
}
|
||||
if (ref_lkg) {
|
||||
data->static_coefficient = static_coeff * lkg / ref_lkg;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user