Skip to content

Commit

Permalink
power_policy: Use new CpufreqPolicy API in imx8 power policies
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejKafka committed Jul 23, 2021
1 parent 56c6ca2 commit 104bbb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/power_policy/imx8_alternating.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ class PowerPolicy_Imx8_Alternating : public PowerPolicy
}

try {
f1_a53 = a53_pol.available_frequencies->at(std::stoul(a53_f1_str));
f2_a53 = a53_pol.available_frequencies->at(std::stoul(a53_f2_str));
f1_a53 = a53_pol.get_freq(std::stoul(a53_f1_str));
f2_a53 = a53_pol.get_freq(std::stoul(a53_f2_str));

f1_a72 = a72_pol.available_frequencies->at(std::stoul(a72_f1_str));
f2_a72 = a72_pol.available_frequencies->at(std::stoul(a72_f2_str));
f1_a72 = a72_pol.get_freq(std::stoul(a72_f1_str));
f2_a72 = a72_pol.get_freq(std::stoul(a72_f2_str));
} catch (...) {
throw_with_nested(
runtime_error("All power policy arguments must be integers in the range <0, 3>"));
Expand Down
4 changes: 2 additions & 2 deletions src/power_policy/imx8_fixed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class PowerPolicy_Imx8_Fixed : public PowerPolicy

CpuFrequencyHz a53_freq, a72_freq;
try {
a53_freq = a53_pol.available_frequencies->at(std::stoul(a53_freq_i));
a72_freq = a72_pol.available_frequencies->at(std::stoul(a72_freq_i));
a53_freq = a53_pol.get_freq(std::stoul(a53_freq_i));
a72_freq = a72_pol.get_freq(std::stoul(a72_freq_i));
} catch (...) {
throw runtime_error("Both power policy arguments must be integers in the range <0, 3>");
}
Expand Down

0 comments on commit 104bbb1

Please sign in to comment.