From e3dfeeb8dbe5a2a79aed2ef74ab9871310d48ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 27 Jun 2026 08:53:21 +0800 Subject: [PATCH] GPU (MT): adds PCIe speed detection support --- src/detection/gpu/gpu_mthreads.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/detection/gpu/gpu_mthreads.c b/src/detection/gpu/gpu_mthreads.c index 0b639f503..8d5271935 100644 --- a/src/detection/gpu/gpu_mthreads.c +++ b/src/detection/gpu/gpu_mthreads.c @@ -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