mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
Remove unused GetPowerCap method
This commit is contained in:
parent
77d0eb3104
commit
496cec843e
@ -94,13 +94,6 @@ impl DaemonConnection {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_power_cap(&self, gpu_id: u32) -> Result<(i64, i64), DaemonError> {
|
||||
match self.send_action(Action::GetPowerCap(gpu_id))? {
|
||||
DaemonResponse::PowerCap(cap) => Ok(cap),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_power_cap(&self, gpu_id: u32, cap: i64) -> Result<(), DaemonError> {
|
||||
match self.send_action(Action::SetPowerCap(gpu_id, cap))? {
|
||||
DaemonResponse::OK => Ok(()),
|
||||
|
@ -42,7 +42,6 @@ pub enum Action {
|
||||
GetFanControl(u32),
|
||||
SetFanCurve(u32, BTreeMap<i64, f64>),
|
||||
SetPowerCap(u32, i64),
|
||||
GetPowerCap(u32),
|
||||
SetPowerProfile(u32, PowerProfile),
|
||||
// SetGPUPowerState(u32, u32, i64, Option<i64>),
|
||||
SetGPUMaxPowerState(u32, i64, Option<i64>),
|
||||
@ -304,13 +303,6 @@ impl Daemon {
|
||||
},
|
||||
None => Err(DaemonError::InvalidID),
|
||||
},
|
||||
Action::GetPowerCap(i) => match self.gpu_controllers.get(&i) {
|
||||
Some(controller) => match controller.get_power_cap() {
|
||||
Ok(cap) => Ok(DaemonResponse::PowerCap(cap)),
|
||||
Err(_) => Err(DaemonError::HWMonError),
|
||||
},
|
||||
None => Err(DaemonError::InvalidID),
|
||||
},
|
||||
Action::SetPowerProfile(i, profile) => match self.gpu_controllers.get_mut(&i) {
|
||||
Some(controller) => match controller.set_power_profile(profile) {
|
||||
Ok(_) => {
|
||||
|
Loading…
Reference in New Issue
Block a user