SWDEV-322620 - Virtual Memory Management
Add a virtualMemoryManagement_ flag to device.info.
Change-Id: Iabd039010d83fc51b4bcef600c609f5c65e7b1ae
[ROCm/clr commit: b4645c7d4e]
This commit is contained in:
@@ -606,6 +606,8 @@ struct Info : public amd::EmbeddedObject {
|
||||
bool aqlBarrierValue_;
|
||||
|
||||
bool pcie_atomics_; //!< Pcie atomics support flag
|
||||
|
||||
bool virtualMemoryManagement_; //!< Virtual memory management support
|
||||
};
|
||||
|
||||
//! Device settings
|
||||
|
||||
@@ -616,6 +616,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_INIT, "Resizable bar enabled");
|
||||
}
|
||||
}
|
||||
info_.virtualMemoryManagement_ = true;
|
||||
}
|
||||
|
||||
Device::XferBuffers::~XferBuffers() {
|
||||
|
||||
@@ -465,6 +465,9 @@ void Resource::memTypeToHeap(Pal::GpuMemoryCreateInfo* createInfo) {
|
||||
createInfo->heaps[2] = Pal::GpuHeapGartUswc;
|
||||
createInfo->flags.peerWritable = dev().P2PAccessAllowed();
|
||||
break;
|
||||
case VaRange:
|
||||
createInfo->heapCount = 0;
|
||||
break;
|
||||
default:
|
||||
createInfo->heaps[0] = Pal::GpuHeapLocal;
|
||||
break;
|
||||
@@ -1272,6 +1275,9 @@ bool Resource::create(MemoryType memType, CreateParams* params, bool forceLinear
|
||||
memRef_->cpuAddress_ = nullptr;
|
||||
mapCount_++;
|
||||
}
|
||||
if (memoryType() == VaRange) {
|
||||
params->owner_->setSvmPtr(reinterpret_cast<void*>(memRef_->iMem()->Desc().gpuVirtAddr));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1624,6 +1624,7 @@ bool Device::populateOCLDeviceConstants() {
|
||||
info_.hmmSupported_, info_.hmmCpuMemoryAccessible_, info_.hmmDirectHostAccess_);
|
||||
|
||||
info_.globalCUMask_ = {};
|
||||
info_.virtualMemoryManagement_ = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user