refactor: don't use global ProductHelper getter 20/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-01-30 00:58:59 +00:00
committed by Compute-Runtime-Automation
parent 7b7c28cb40
commit d2628babbc
3 changed files with 11 additions and 6 deletions

View File

@@ -84,7 +84,8 @@ class SysmanDeviceMemoryFixture : public SysmanDeviceFixture {
}
auto &hwInfo = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getHardwareInfo();
productFamily = hwInfo.platform.eProductFamily;
stepping = NEO::ProductHelper::get(productFamily)->getSteppingFromHwRevId(hwInfo);
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
stepping = productHelper.getSteppingFromHwRevId(hwInfo);
getMemoryHandles(0);
}
@@ -406,7 +407,8 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
zesMemoryGetProperties(handle, &properties);
auto hwInfo = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo();
hwInfo->platform.usRevId = NEO::ProductHelper::get(productFamily)->getHwRevIdFromStepping(REVISION_B, *hwInfo);
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
pPmt->mockVfid0Status = true;
@@ -440,7 +442,8 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
zesMemoryGetProperties(handle, &properties);
auto hwInfo = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo();
hwInfo->platform.usRevId = NEO::ProductHelper::get(productFamily)->getHwRevIdFromStepping(REVISION_B, *hwInfo);
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
pPmt->mockVfid1Status = true;
@@ -471,7 +474,8 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidUsRevIdForRevisionBWhenCallingzes
zesMemoryGetProperties(handle, &properties);
auto hwInfo = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo();
hwInfo->platform.usRevId = NEO::ProductHelper::get(productFamily)->getHwRevIdFromStepping(REVISION_B, *hwInfo);
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
pPmt->mockVfid1Status = true;
pSysfsAccess->mockReadUInt64Value.push_back(hbmRP0Frequency);