L0 Core Add Support For pci_speed_ext

This patch adds support for reading PCI bandwidth, generation
and linkwidth information from sysfs nodes for the linux
platform.

Related-To: LOCI-2969

Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
Joshua Santosh Ranjan
2022-02-28 13:31:18 +00:00
committed by Compute-Runtime-Automation
parent 061af9c284
commit 05a150f49f
29 changed files with 722 additions and 60 deletions

View File

@@ -334,7 +334,7 @@ ze_result_t DeviceImp::getPciProperties(ze_pci_ext_properties_t *pPciProperties)
}
pPciProperties->address = {pciBusInfo.pciDomain, pciBusInfo.pciBus,
pciBusInfo.pciDevice, pciBusInfo.pciFunction};
pPciProperties->maxSpeed = {-1, -1, -1};
pPciProperties->maxSpeed = pciMaxSpeed;
return ZE_RESULT_SUCCESS;
}
@@ -906,6 +906,13 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, bool
device->neoDevice->getHardwareInfo().platform.eProductFamily, device, &cmdQueueDesc, true, NEO::EngineGroupType::Copy, resultValue);
}
if (osInterface) {
auto pciSpeedInfo = osInterface->getDriverModel()->getPciSpeedInfo();
device->pciMaxSpeed.genVersion = pciSpeedInfo.genVersion;
device->pciMaxSpeed.maxBandwidth = pciSpeedInfo.maxBandwidth;
device->pciMaxSpeed.width = pciSpeedInfo.width;
}
if (device->getSourceLevelDebugger()) {
auto osInterface = neoDevice->getRootDeviceEnvironment().osInterface.get();
device->getSourceLevelDebugger()

View File

@@ -113,6 +113,7 @@ struct DeviceImp : public Device {
std::unordered_map<uint32_t, bool> crossAccessEnabledDevices;
DriverHandle *driverHandle = nullptr;
CommandList *pageFaultCommandList = nullptr;
ze_pci_speed_ext_t pciMaxSpeed = {-1, -1, -1};
bool resourcesReleased = false;
void releaseResources();