add getDeviceHandle() at OS specific level

Change-Id: I95fc24043f8f603d6270323b0f23a78f9d8ad2f1
Signed-off-by: mraghuwa <mayank.raghuwanshi@intel.com>
This commit is contained in:
mraghuwa
2020-08-13 23:33:21 +05:30
committed by sys_ocldev
parent 649dfb93ee
commit 4b8d4285d7
30 changed files with 103 additions and 51 deletions

View File

@@ -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) {

View File

@@ -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);