mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
chore: bump pciid-parser and adopt breaking changes
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -1806,9 +1806,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pciid-parser"
|
name = "pciid-parser"
|
||||||
version = "0.7.2"
|
version = "0.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e889f5dad24e8b842a0417e1df0fa250f4e300d1eb88b81d48a9db5bfff6e035"
|
checksum = "0008e816fcdaf229cdd540e9b6ca2dc4a10d65c31624abb546c6420a02846e61"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ divan = { workspace = true, optional = true }
|
|||||||
|
|
||||||
nvml-wrapper = { git = "https://github.com/ilya-zlobintsev/nvml-wrapper", branch = "lact" }
|
nvml-wrapper = { git = "https://github.com/ilya-zlobintsev/nvml-wrapper", branch = "lact" }
|
||||||
bitflags = "2.6.0"
|
bitflags = "2.6.0"
|
||||||
pciid-parser = { version = "0.7", features = ["serde"] }
|
pciid-parser = { version = "0.8", features = ["serde"] }
|
||||||
serde_yaml = "0.9"
|
serde_yaml = "0.9"
|
||||||
vulkano = { version = "0.34.1", default-features = false }
|
vulkano = { version = "0.34.1", default-features = false }
|
||||||
zbus = { version = "5.3.1", default-features = false, features = ["tokio"] }
|
zbus = { version = "5.3.1", default-features = false, features = ["tokio"] }
|
||||||
|
|||||||
@@ -113,12 +113,17 @@ pub(crate) fn init_controller(
|
|||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
let subsystem_info = subsystem_entry
|
let subsystem_info = subsystem_entry
|
||||||
.map(|(subsys_vendor_id, subsys_device_id)| {
|
.and_then(|(subsys_vendor_id, subsys_device_id)| {
|
||||||
pci_db.get_device_info(vendor_id, device_id, subsys_vendor_id, subsys_device_id)
|
Some(pci_db.get_device_info(
|
||||||
|
u16::from_str_radix(vendor_id, 16).ok()?,
|
||||||
|
u16::from_str_radix(device_id, 16).ok()?,
|
||||||
|
u16::from_str_radix(subsys_vendor_id, 16).ok()?,
|
||||||
|
u16::from_str_radix(subsys_device_id, 16).ok()?,
|
||||||
|
))
|
||||||
})
|
})
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
let vendor = pci_db.vendors.get(&vendor_id.to_ascii_lowercase());
|
let vendor = pci_db.vendors.get(&u16::from_str_radix(vendor_id, 16)?);
|
||||||
|
|
||||||
let pci_info = GpuPciInfo {
|
let pci_info = GpuPciInfo {
|
||||||
device_pci_info: PciInfo {
|
device_pci_info: PciInfo {
|
||||||
@@ -128,7 +133,7 @@ pub(crate) fn init_controller(
|
|||||||
model: vendor.and_then(|vendor| {
|
model: vendor.and_then(|vendor| {
|
||||||
vendor
|
vendor
|
||||||
.devices
|
.devices
|
||||||
.get(&device_id.to_ascii_lowercase())
|
.get(&u16::from_str_radix(device_id, 16).ok()?)
|
||||||
.map(|device| device.name.clone())
|
.map(|device| device.name.clone())
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user