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
13fc0166bd
commit
358b35b49a
@ -128,13 +128,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> {
|
pub fn set_power_cap(&self, gpu_id: u32, cap: i64) -> Result<(), DaemonError> {
|
||||||
match self.send_action(Action::SetPowerCap(gpu_id, cap))? {
|
match self.send_action(Action::SetPowerCap(gpu_id, cap))? {
|
||||||
DaemonResponse::OK => Ok(()),
|
DaemonResponse::OK => Ok(()),
|
||||||
|
@ -41,7 +41,6 @@ pub enum Action {
|
|||||||
GetFanControl(u32),
|
GetFanControl(u32),
|
||||||
SetFanCurve(u32, BTreeMap<i64, f64>),
|
SetFanCurve(u32, BTreeMap<i64, f64>),
|
||||||
SetPowerCap(u32, i64),
|
SetPowerCap(u32, i64),
|
||||||
GetPowerCap(u32),
|
|
||||||
SetPowerProfile(u32, PowerProfile),
|
SetPowerProfile(u32, PowerProfile),
|
||||||
// SetGPUPowerState(u32, u32, i64, Option<i64>),
|
// SetGPUPowerState(u32, u32, i64, Option<i64>),
|
||||||
SetGPUMaxPowerState(u32, i64, Option<i64>),
|
SetGPUMaxPowerState(u32, i64, Option<i64>),
|
||||||
@ -295,13 +294,6 @@ impl Daemon {
|
|||||||
},
|
},
|
||||||
None => Err(DaemonError::InvalidID),
|
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) {
|
Action::SetPowerProfile(i, profile) => match self.gpu_controllers.get_mut(&i) {
|
||||||
Some(controller) => match controller.set_power_profile(profile) {
|
Some(controller) => match controller.set_power_profile(profile) {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user