mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-05 14:10:34 -04:00
power: Remove inline GPU clock range check, sysfs writes enforce it
This commit is contained in:
parent
fd6d9cbfe0
commit
6867c4e870
2 changed files with 1 additions and 9 deletions
|
@ -487,9 +487,6 @@ mod test {
|
|||
proxy.set_manual_gpu_clock(200).await.expect("proxy_set");
|
||||
assert_eq!(read_clocks().await.unwrap(), format_clocks(200));
|
||||
|
||||
assert!(proxy.set_manual_gpu_clock(100).await.is_err());
|
||||
assert_eq!(read_clocks().await.unwrap(), format_clocks(200));
|
||||
|
||||
test.connection.close().await.unwrap();
|
||||
}
|
||||
|
||||
|
|
|
@ -275,10 +275,8 @@ pub(crate) async fn set_cpu_scaling_governor(governor: CPUScalingGovernor) -> Re
|
|||
}
|
||||
|
||||
pub(crate) async fn set_gpu_clocks(clocks: u32) -> Result<()> {
|
||||
// Set GPU clocks to given value valid between 200 - 1600
|
||||
// Set GPU clocks to given value valid
|
||||
// Only used when GPU Performance Level is manual, but write whenever called.
|
||||
ensure!((200..=1600).contains(&clocks), "Invalid clocks");
|
||||
|
||||
let base = find_hwmon().await?;
|
||||
let mut myfile = File::create(base.join(GPU_CLOCKS_SUFFIX))
|
||||
.await
|
||||
|
@ -627,9 +625,6 @@ CCLK_RANGE in Core0:
|
|||
assert!(set_gpu_clocks(1600).await.is_err());
|
||||
setup().await;
|
||||
|
||||
assert!(set_gpu_clocks(100).await.is_err());
|
||||
assert!(set_gpu_clocks(2000).await.is_err());
|
||||
|
||||
assert!(set_gpu_clocks(200).await.is_ok());
|
||||
|
||||
assert_eq!(read_clocks().await.unwrap(), format_clocks(200));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue