File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,20 @@ def check_storage(self):
340340 and (valid_ahci or not has_sata )
341341 )
342342
343+ def check_amd_xdna (self ):
344+ """Check for AMD XDNA driver"""
345+ for device in self .pyudev .list_devices (subsystem = "pci" , PCI_CLASS = "118000" ):
346+ slot = device .properties ["PCI_SLOT_NAME" ]
347+ driver = device .properties .get ("DRIVER" )
348+ if not driver :
349+ self .db .record_prereq (f"NPU device in { slot } missing driver" , "🚦" )
350+ self .failures += [MissingDriver (slot )]
351+ return False
352+ p = os .path .join (device .sys_path , "fw_version" )
353+ xdna_fw_version = read_file (p )
354+ self .db .record_prereq (f"NPU loaded with firmware { xdna_fw_version } " , "✅" )
355+ return True
356+
343357 def check_amd_hsmp (self ):
344358 """Check for AMD HSMP driver"""
345359 # not needed to check in newer kernels
@@ -1356,6 +1370,7 @@ def run(self):
13561370 self .check_i2c_hid ,
13571371 self .check_pinctrl_amd ,
13581372 self .check_amd_hsmp ,
1373+ self .check_amd_xdna ,
13591374 self .check_amd_pmc ,
13601375 self .check_amd_cpu_hpet_wa ,
13611376 self .check_port_pm_override ,
You can’t perform that action at this time.
0 commit comments