mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
Add ULT for DrmMemoryManager
- ensure DrmMemoryManager::releaseGpuRange() calls GmmHelper::decanonize() before pass gpuAddress to GfxPartition::freeGpuAddressRange() Related-To: NEO-2877, NEO-3530 Change-Id: I6f6b745a8f9262c6980b9ddd32c70d376fa49726 Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
5f4cf2ac35
commit
e721ff1ec3
@@ -45,7 +45,7 @@ WddmMemoryManager::WddmMemoryManager(ExecutionEnvironment &executionEnvironment)
|
||||
if (asyncDeleterEnabled)
|
||||
deferredDeleter = createDeferredDeleter();
|
||||
mallocRestrictions.minAddress = wddm->getWddmMinAddress();
|
||||
wddm->initGfxPartition(gfxPartition);
|
||||
wddm->initGfxPartition(*gfxPartition);
|
||||
}
|
||||
|
||||
GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForImageImpl(const AllocationData &allocationData, std::unique_ptr<Gmm> gmm) {
|
||||
@@ -504,13 +504,13 @@ bool WddmMemoryManager::mapGpuVaForOneHandleAllocation(WddmAllocation *allocatio
|
||||
addressToMap = allocation->reservedGpuVirtualAddress;
|
||||
}
|
||||
auto status = wddm->mapGpuVirtualAddress(allocation->getDefaultGmm(), allocation->getDefaultHandle(),
|
||||
gfxPartition.getHeapMinimalAddress(heapIndex), gfxPartition.getHeapLimit(heapIndex),
|
||||
gfxPartition->getHeapMinimalAddress(heapIndex), gfxPartition->getHeapLimit(heapIndex),
|
||||
addressToMap, allocation->getGpuAddressToModify());
|
||||
|
||||
if (!status && deferredDeleter) {
|
||||
deferredDeleter->drain(true);
|
||||
status = wddm->mapGpuVirtualAddress(allocation->getDefaultGmm(), allocation->getDefaultHandle(),
|
||||
gfxPartition.getHeapMinimalAddress(heapIndex), gfxPartition.getHeapLimit(heapIndex),
|
||||
gfxPartition->getHeapMinimalAddress(heapIndex), gfxPartition->getHeapLimit(heapIndex),
|
||||
addressToMap, allocation->getGpuAddressToModify());
|
||||
}
|
||||
if (!status) {
|
||||
@@ -542,8 +542,8 @@ void WddmMemoryManager::obtainGpuAddressIfNeeded(WddmAllocation *allocation) {
|
||||
if (allocation->getNumHandles() > 1u) {
|
||||
auto heapIndex = selectHeap(allocation, false, executionEnvironment.isFullRangeSvm());
|
||||
allocation->reservedSizeForGpuVirtualAddress = allocation->getAlignedSize();
|
||||
allocation->reservedGpuVirtualAddress = wddm->reserveGpuVirtualAddress(gfxPartition.getHeapMinimalAddress(heapIndex),
|
||||
gfxPartition.getHeapLimit(heapIndex),
|
||||
allocation->reservedGpuVirtualAddress = wddm->reserveGpuVirtualAddress(gfxPartition->getHeapMinimalAddress(heapIndex),
|
||||
gfxPartition->getHeapLimit(heapIndex),
|
||||
allocation->reservedSizeForGpuVirtualAddress);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user