Remove unused GetPowerCap method

This commit is contained in:
Ilya Zlobintsev 2021-03-02 16:20:48 +02:00
parent 77d0eb3104
commit 496cec843e
2 changed files with 0 additions and 15 deletions

View File

@ -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(()),

View File

@ -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(_) => {