Skip to content

Commit c2ce029

Browse files
committed
--versions: Better ignore systems without nvidia
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 42021c5 commit c2ce029

File tree

1 file changed

+14
-5
lines changed
  • framework_lib/src/commandline

1 file changed

+14
-5
lines changed

framework_lib/src/commandline/mod.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -804,12 +804,21 @@ fn print_versions(ec: &CrosEc) {
804804
#[cfg(feature = "nvidia")]
805805
fn probably_has_nvidia() -> bool {
806806
match smbios::get_platform().and_then(Platform::which_family) {
807-
Some(PlatformFamily::Framework12) => false,
808-
Some(PlatformFamily::Framework13) => false,
809-
Some(PlatformFamily::FrameworkDesktop) => true,
810-
Some(PlatformFamily::Framework16) => true,
811-
_ => true,
807+
Some(PlatformFamily::Framework12) => return false,
808+
Some(PlatformFamily::Framework13) => return false,
809+
Some(PlatformFamily::FrameworkDesktop) => return false,
810+
_ => {}
811+
}
812+
813+
// No Intel Framework system with nvidia so far
814+
// TODO: Matching on PCI device would be better
815+
if let Some(smbios) = get_smbios() {
816+
if csme::me_version_from_smbios(&smbios).is_some() {
817+
return false;
818+
}
812819
}
820+
821+
true
813822
}
814823

815824
/// Brief NVIDIA details for --version output

0 commit comments

Comments
 (0)