mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Change method of access to pinBB vectors
Related-To: NEO-4319 Change-Id: I70695361c368a7769b6dbb7db57597f188226133 Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
357fdc2e65
commit
e453d2c04f
@@ -47,11 +47,11 @@ DrmMemoryManager::DrmMemoryManager(gemCloseWorkerMode mode,
|
||||
for (uint32_t rootDeviceIndex = 0; rootDeviceIndex < gfxPartitions.size(); ++rootDeviceIndex) {
|
||||
if (forcePinEnabled || validateHostPtrMemory) {
|
||||
memoryForPinBBs.push_back(alignedMallocWrapper(MemoryConstants::pageSize, MemoryConstants::pageSize));
|
||||
DEBUG_BREAK_IF(memoryForPinBBs.at(rootDeviceIndex) == nullptr);
|
||||
pinBBs.push_back(allocUserptr(reinterpret_cast<uintptr_t>(memoryForPinBBs.at(rootDeviceIndex)), MemoryConstants::pageSize, 0, rootDeviceIndex));
|
||||
if (!pinBBs.at(rootDeviceIndex)) {
|
||||
alignedFreeWrapper(memoryForPinBBs.at(rootDeviceIndex));
|
||||
memoryForPinBBs.at(rootDeviceIndex) = nullptr;
|
||||
DEBUG_BREAK_IF(memoryForPinBBs[rootDeviceIndex] == nullptr);
|
||||
pinBBs.push_back(allocUserptr(reinterpret_cast<uintptr_t>(memoryForPinBBs[rootDeviceIndex]), MemoryConstants::pageSize, 0, rootDeviceIndex));
|
||||
if (!pinBBs[rootDeviceIndex]) {
|
||||
alignedFreeWrapper(memoryForPinBBs[rootDeviceIndex]);
|
||||
memoryForPinBBs[rootDeviceIndex] = nullptr;
|
||||
DEBUG_BREAK_IF(true);
|
||||
UNRECOVERABLE_IF(validateHostPtrMemory);
|
||||
}
|
||||
@@ -67,7 +67,6 @@ DrmMemoryManager::~DrmMemoryManager() {
|
||||
MemoryManager::alignedFreeWrapper(memoryForPinBB);
|
||||
}
|
||||
}
|
||||
memoryForPinBBs.clear();
|
||||
}
|
||||
|
||||
void DrmMemoryManager::commonCleanup() {
|
||||
|
||||
Reference in New Issue
Block a user