mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
fix: update amdgpu-sysfs with iGPU fixes, add steam deck quirk (#407)
* feat: van gogh support * fix: device id * fix
This commit is contained in:
parent
8084247d24
commit
27d3402d08
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -53,9 +53,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
|
||||
|
||||
[[package]]
|
||||
name = "amdgpu-sysfs"
|
||||
version = "0.17.0"
|
||||
version = "0.17.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2175fc4ea95f486dfe93f657b3447cb58caed82d7d5fd3bcfdffdf6888ffce15"
|
||||
checksum = "01631a1d520df9737660f26b0c64c5ea9d74667bf4cbb1c1559a6ddb8478c4ef"
|
||||
dependencies = [
|
||||
"enum_dispatch",
|
||||
"serde",
|
||||
|
@ -46,6 +46,8 @@ use {
|
||||
|
||||
const GPU_CLOCKDOWN_TIMEOUT_SECS: u64 = 3;
|
||||
const MAX_PSTATE_READ_ATTEMPTS: u32 = 5;
|
||||
const VENDOR_AMD: &str = "1002";
|
||||
const STEAM_DECK_IDS: [&str; 2] = ["163F", "1435"];
|
||||
|
||||
pub struct AmdGpuController {
|
||||
handle: GpuHandle,
|
||||
@ -518,6 +520,13 @@ impl AmdGpuController {
|
||||
|
||||
None
|
||||
}
|
||||
|
||||
fn is_steam_deck(&self) -> bool {
|
||||
self.pci_info.as_ref().is_some_and(|info| {
|
||||
info.device_pci_info.vendor_id == VENDOR_AMD
|
||||
&& STEAM_DECK_IDS.contains(&info.device_pci_info.model_id.as_str())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl GpuController for AmdGpuController {
|
||||
@ -774,10 +783,17 @@ impl GpuController for AmdGpuController {
|
||||
// Reset the clocks table in case the settings get reverted back to not having a clocks value configured
|
||||
self.handle.reset_clocks_table().ok();
|
||||
|
||||
// Reset performance level to work around some GPU quirks (found to be an issue on RDNA2)
|
||||
self.handle
|
||||
.set_power_force_performance_level(PerformanceLevel::Auto)
|
||||
.ok();
|
||||
if self.is_steam_deck() {
|
||||
// Van Gogh/Sephiroth only allow clock settings to be used with manual performance mode
|
||||
self.handle
|
||||
.set_power_force_performance_level(PerformanceLevel::Manual)
|
||||
.ok();
|
||||
} else {
|
||||
// Reset performance level to work around some GPU quirks (found to be an issue on RDNA2)
|
||||
self.handle
|
||||
.set_power_force_performance_level(PerformanceLevel::Auto)
|
||||
.ok();
|
||||
}
|
||||
|
||||
if config.is_core_clocks_used() {
|
||||
let original_table = self
|
||||
|
Loading…
Reference in New Issue
Block a user