mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Move entirely to using only platform-profile
throttle_thermal_policy is not ideal anymore and may be removed from kernel in the future.
This commit is contained in:
@@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
|
||||
use zbus::zvariant::{OwnedValue, Type, Value};
|
||||
|
||||
use crate::error::{PlatformError, Result};
|
||||
use crate::platform::ThrottlePolicy;
|
||||
use crate::platform::PlatformProfile;
|
||||
use crate::{read_attr_string, to_device};
|
||||
|
||||
const ATTR_AVAILABLE_GOVERNORS: &str = "cpufreq/scaling_available_governors";
|
||||
@@ -201,12 +201,12 @@ pub enum CPUEPP {
|
||||
Power = 4
|
||||
}
|
||||
|
||||
impl From<ThrottlePolicy> for CPUEPP {
|
||||
fn from(value: ThrottlePolicy) -> Self {
|
||||
impl From<PlatformProfile> for CPUEPP {
|
||||
fn from(value: PlatformProfile) -> Self {
|
||||
match value {
|
||||
ThrottlePolicy::Balanced => CPUEPP::BalancePerformance,
|
||||
ThrottlePolicy::Performance => CPUEPP::Performance,
|
||||
ThrottlePolicy::Quiet => CPUEPP::Power
|
||||
PlatformProfile::Balanced => CPUEPP::BalancePerformance,
|
||||
PlatformProfile::Performance => CPUEPP::Performance,
|
||||
PlatformProfile::Quiet => CPUEPP::Power
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user