mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
add getDeviceHandle() at OS specific level
Change-Id: I95fc24043f8f603d6270323b0f23a78f9d8ad2f1 Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
This commit is contained in:
@@ -31,9 +31,7 @@ std::string changeDirNLevelsUp(std::string realRootPath, uint8_t nLevel) {
|
||||
}
|
||||
return realRootPath;
|
||||
}
|
||||
void LinuxPciImp::setLmemSupport(bool val) {
|
||||
isLmemSupported = val;
|
||||
}
|
||||
|
||||
ze_result_t LinuxPciImp::getPciBdf(std::string &bdf) {
|
||||
std::string bdfDir;
|
||||
ze_result_t result = pSysfsAccess->readSymLink(deviceDir, bdfDir);
|
||||
@@ -182,6 +180,8 @@ LinuxPciImp::LinuxPciImp(OsSysman *pOsSysman) {
|
||||
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
|
||||
pSysfsAccess = &pLinuxSysmanImp->getSysfsAccess();
|
||||
pfsAccess = &pLinuxSysmanImp->getFsAccess();
|
||||
Device *pDevice = pLinuxSysmanImp->getDeviceHandle();
|
||||
isLmemSupported = pDevice->getDriverHandle()->getMemoryManager()->isLocalMemorySupported(pDevice->getRootDeviceIndex());
|
||||
}
|
||||
|
||||
OsPci *OsPci::create(OsSysman *pOsSysman) {
|
||||
|
||||
@@ -21,7 +21,6 @@ class LinuxPciImp : public OsPci, NEO::NonCopyableOrMovableClass {
|
||||
ze_result_t getMaxLinkSpeed(double &maxLinkSpeed) override;
|
||||
ze_result_t getMaxLinkWidth(int32_t &maxLinkwidth) override;
|
||||
ze_result_t getLinkGen(int32_t &linkGen) override;
|
||||
void setLmemSupport(bool val) override;
|
||||
ze_result_t initializeBarProperties(std::vector<zes_pci_bar_properties_t *> &pBarProperties) override;
|
||||
LinuxPciImp() = default;
|
||||
LinuxPciImp(OsSysman *pOsSysman);
|
||||
|
||||
Reference in New Issue
Block a user