mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
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:
committed by
Compute-Runtime-Automation
parent
061af9c284
commit
05a150f49f
@@ -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()
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user