mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
Merge branches 'pm-em', 'pm-opp' and 'pm-devfreq'
Merge energy model management, OPP (operating performance points) and devfreq updates for 6.18-rc1: - Prevent CPU capacity updates after registering a perf domain from failing on a first CPU that is not present (Christian Loehle) - Add support for the cases in which frequency alone is not sufficient to uniquely identify an OPP (Krishna Chaitanya Chundru) - Use to_result() for OPP error handling in Rust (Onur Özkan) - Add support for LPDDR5 on Rockhip RK3588 SoC to rockchip-dfi devfreq driver (Nicolas Frattaroli) - Fix an issue where DDR cycle counts on RK3588/RK3528 with LPDDR4(X) are reported as half by adding a cycle multiplier to the DFI driver in rockchip-dfi devfreq-event driver (Nicolas Frattaroli) - Fix missing error pointer dereference check of regulator instance in the mtk-cci devfreq driver probe and remove a redundant condition from an if () statement in that driver (Dan Carpenter, Liao Yuanhong) * pm-em: PM: EM: Fix late boot with holes in CPU topology * pm-opp: OPP: Add support to find OPP for a set of keys rust: opp: use to_result for error handling * pm-devfreq: PM / devfreq: rockchip-dfi: add support for LPDDR5 PM / devfreq: rockchip-dfi: double count on RK3588 PM / devfreq: mtk-cci: avoid redundant conditions PM / devfreq: mtk-cci: Fix potential error pointer dereference in probe()
This commit is contained in:
@@ -12,7 +12,7 @@ use crate::{
|
||||
clk::Hertz,
|
||||
cpumask::{Cpumask, CpumaskVar},
|
||||
device::Device,
|
||||
error::{code::*, from_err_ptr, from_result, to_result, Error, Result, VTABLE_DEFAULT_ERROR},
|
||||
error::{code::*, from_err_ptr, from_result, to_result, Result, VTABLE_DEFAULT_ERROR},
|
||||
ffi::c_ulong,
|
||||
prelude::*,
|
||||
str::CString,
|
||||
@@ -501,11 +501,8 @@ impl<T: ConfigOps + Default> Config<T> {
|
||||
// requirements. The OPP core guarantees not to access fields of [`Config`] after this call
|
||||
// and so we don't need to save a copy of them for future use.
|
||||
let ret = unsafe { bindings::dev_pm_opp_set_config(dev.as_raw(), &mut config) };
|
||||
if ret < 0 {
|
||||
Err(Error::from_errno(ret))
|
||||
} else {
|
||||
Ok(ConfigToken(ret))
|
||||
}
|
||||
|
||||
to_result(ret).map(|()| ConfigToken(ret))
|
||||
}
|
||||
|
||||
/// Config's clk callback.
|
||||
@@ -714,11 +711,8 @@ impl Table {
|
||||
// SAFETY: The requirements are satisfied by the existence of [`Device`] and its safety
|
||||
// requirements.
|
||||
let ret = unsafe { bindings::dev_pm_opp_get_opp_count(self.dev.as_raw()) };
|
||||
if ret < 0 {
|
||||
Err(Error::from_errno(ret))
|
||||
} else {
|
||||
Ok(ret as u32)
|
||||
}
|
||||
|
||||
to_result(ret).map(|()| ret as u32)
|
||||
}
|
||||
|
||||
/// Returns max clock latency (in nanoseconds) of the [`OPP`]s in the [`Table`].
|
||||
|
||||
Reference in New Issue
Block a user