Store root device environment reference in gmm helper

Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-12-19 18:41:13 +00:00
committed by Compute-Runtime-Automation
parent 8f1bdb220f
commit 1d6c3b0e04
6 changed files with 28 additions and 25 deletions

View File

@@ -24,7 +24,11 @@ GmmClientContext *GmmHelper::getClientContext() const {
}
const HardwareInfo *GmmHelper::getHardwareInfo() {
return hwInfo;
return rootDeviceEnvironment.getHardwareInfo();
}
const RootDeviceEnvironment &GmmHelper::getRootDeviceEnvironment() const {
return rootDeviceEnvironment;
}
uint32_t GmmHelper::getMOCS(uint32_t type) const {
@@ -43,7 +47,8 @@ void GmmHelper::applyMocsEncryptionBit(uint32_t &index) {
}
}
GmmHelper::GmmHelper(const RootDeviceEnvironment &rootDeviceEnvironment) : hwInfo(rootDeviceEnvironment.getHardwareInfo()) {
GmmHelper::GmmHelper(const RootDeviceEnvironment &rootDeviceEnvironmentArg) : rootDeviceEnvironment(rootDeviceEnvironmentArg) {
auto hwInfo = getHardwareInfo();
auto hwInfoAddressWidth = Math::log2(hwInfo->capabilityTable.gpuAddressSpace + 1);
addressWidth = std::max(hwInfoAddressWidth, 48u);