GPU (MT): adds PCIe speed detection support

This commit is contained in:
李通洲
2026-06-27 08:53:21 +08:00
parent ccdcd6ab6f
commit e3dfeeb8db
+14
View File
@@ -190,6 +190,20 @@ const char* ffDetectMthreadsGpuInfo(const FFGpuDriverCondition* cond, FFGpuDrive
}
}
if (result.psCurr || result.psMax) {
MtmlPciInfo pciInfo;
if (mtmlData.ffmtmlDeviceGetPciInfo(device, &pciInfo) == MTML_SUCCESS) {
if (result.psCurr) {
result.psCurr->lanes = (uint16_t) pciInfo.pciCurWidth;
result.psCurr->gen = (uint16_t) pciInfo.pciCurGen;
}
if (result.psMax) {
result.psMax->lanes = (uint16_t) pciInfo.pciMaxWidth;
result.psMax->gen = (uint16_t) pciInfo.pciMaxGen;
}
}
}
return NULL;
#else