@@ -39,7 +39,7 @@ DrmMemoryManager::DrmMemoryManager(gemCloseWorkerMode mode,
3939 forcePinEnabled(forcePinAllowed),
4040 validateHostPtrMemory(validateHostPtrMemory) {
4141 supportsMultiStorageResources = false ;
42- gfxPartition. init (platformDevices[0 ]->capabilityTable .gpuAddressSpace , getSizeToReserve ());
42+ gfxPartition-> init (platformDevices[0 ]->capabilityTable .gpuAddressSpace , getSizeToReserve ());
4343 MemoryManager::virtualPaddingAvailable = true ;
4444 if (mode != gemCloseWorkerMode::gemCloseWorkerInactive) {
4545 gemCloseWorker.reset (new DrmGemCloseWorker (*this ));
@@ -130,12 +130,12 @@ uint32_t DrmMemoryManager::unreference(NEO::BufferObject *bo, bool synchronousDe
130130uint64_t DrmMemoryManager::acquireGpuRange (size_t &size, StorageAllocatorType &storageType, bool specificBitness) {
131131 if (specificBitness && this ->force32bitAllocations ) {
132132 storageType = BIT32_ALLOCATOR_EXTERNAL;
133- return GmmHelper::canonize (gfxPartition. heapAllocate (HeapIndex::HEAP_EXTERNAL, size));
133+ return GmmHelper::canonize (gfxPartition-> heapAllocate (HeapIndex::HEAP_EXTERNAL, size));
134134 }
135135
136136 if (isLimitedRange ()) {
137137 storageType = INTERNAL_ALLOCATOR_WITH_DYNAMIC_BITRANGE;
138- return GmmHelper::canonize (gfxPartition. heapAllocate (HeapIndex::HEAP_STANDARD, size));
138+ return GmmHelper::canonize (gfxPartition-> heapAllocate (HeapIndex::HEAP_STANDARD, size));
139139 }
140140
141141 storageType = MMAP_ALLOCATOR;
@@ -150,7 +150,7 @@ void DrmMemoryManager::releaseGpuRange(void *address, size_t unmapSize, StorageA
150150
151151 uint64_t graphicsAddress = static_cast <uint64_t >(reinterpret_cast <uintptr_t >(address));
152152 graphicsAddress = GmmHelper::decanonize (graphicsAddress);
153- gfxPartition. freeGpuAddressRange (graphicsAddress, unmapSize);
153+ gfxPartition-> freeGpuAddressRange (graphicsAddress, unmapSize);
154154}
155155
156156NEO::BufferObject *DrmMemoryManager::allocUserptr (uintptr_t address, size_t size, uint64_t flags) {
@@ -228,7 +228,7 @@ DrmAllocation *DrmMemoryManager::allocateGraphicsMemoryWithAlignment(const Alloc
228228 if (allocationData.type == GraphicsAllocation::AllocationType::SVM_CPU) {
229229 // add 2MB padding in case reserved addr is not 2MB aligned
230230 reserveSizeAligned = alignUp (cSize, cAlignment) + cAlignment;
231- reservedGpuAddress = GmmHelper::canonize (gfxPartition. heapAllocate (HeapIndex::HEAP_STANDARD, reserveSizeAligned));
231+ reservedGpuAddress = GmmHelper::canonize (gfxPartition-> heapAllocate (HeapIndex::HEAP_STANDARD, reserveSizeAligned));
232232 if (!reservedGpuAddress) {
233233 bo->close ();
234234 delete bo;
@@ -346,7 +346,7 @@ DrmAllocation *DrmMemoryManager::allocate32BitGraphicsMemoryImpl(const Allocatio
346346 uintptr_t inputPtr = reinterpret_cast <uintptr_t >(allocationData.hostPtr );
347347 auto allocationSize = alignSizeWholePage (allocationData.hostPtr , allocationData.size );
348348 auto realAllocationSize = allocationSize;
349- auto gpuVirtualAddress = gfxPartition. heapAllocate (allocatorToUse, realAllocationSize);
349+ auto gpuVirtualAddress = gfxPartition-> heapAllocate (allocatorToUse, realAllocationSize);
350350 if (!gpuVirtualAddress) {
351351 return nullptr ;
352352 }
@@ -355,7 +355,7 @@ DrmAllocation *DrmMemoryManager::allocate32BitGraphicsMemoryImpl(const Allocatio
355355
356356 BufferObject *bo = allocUserptr (alignedUserPointer, allocationSize, 0 );
357357 if (!bo) {
358- gfxPartition. heapFree (allocatorToUse, gpuVirtualAddress, realAllocationSize);
358+ gfxPartition-> heapFree (allocatorToUse, gpuVirtualAddress, realAllocationSize);
359359 return nullptr ;
360360 }
361361
@@ -366,13 +366,13 @@ DrmAllocation *DrmMemoryManager::allocate32BitGraphicsMemoryImpl(const Allocatio
366366 auto allocation = new DrmAllocation (allocationData.type , bo, const_cast <void *>(allocationData.hostPtr ), GmmHelper::canonize (ptrOffset (gpuVirtualAddress, inputPointerOffset)),
367367 allocationSize, MemoryPool::System4KBPagesWith32BitGpuAddressing, false );
368368 allocation->set32BitAllocation (true );
369- allocation->setGpuBaseAddress (GmmHelper::canonize (gfxPartition. getHeapBase (allocatorToUse)));
369+ allocation->setGpuBaseAddress (GmmHelper::canonize (gfxPartition-> getHeapBase (allocatorToUse)));
370370 return allocation;
371371 }
372372
373373 size_t alignedAllocationSize = alignUp (allocationData.size , MemoryConstants::pageSize);
374374 auto allocationSize = alignedAllocationSize;
375- auto res = gfxPartition. heapAllocate (allocatorToUse, allocationSize);
375+ auto res = gfxPartition-> heapAllocate (allocatorToUse, allocationSize);
376376
377377 if (!res) {
378378 return nullptr ;
@@ -381,15 +381,15 @@ DrmAllocation *DrmMemoryManager::allocate32BitGraphicsMemoryImpl(const Allocatio
381381 auto ptrAlloc = alignedMallocWrapper (alignedAllocationSize, MemoryConstants::allocationAlignment);
382382
383383 if (!ptrAlloc) {
384- gfxPartition. heapFree (allocatorToUse, res, allocationSize);
384+ gfxPartition-> heapFree (allocatorToUse, res, allocationSize);
385385 return nullptr ;
386386 }
387387
388388 BufferObject *bo = allocUserptr (reinterpret_cast <uintptr_t >(ptrAlloc), alignedAllocationSize, 0 );
389389
390390 if (!bo) {
391391 alignedFreeWrapper (ptrAlloc);
392- gfxPartition. heapFree (allocatorToUse, res, allocationSize);
392+ gfxPartition-> heapFree (allocatorToUse, res, allocationSize);
393393 return nullptr ;
394394 }
395395
@@ -404,7 +404,7 @@ DrmAllocation *DrmMemoryManager::allocate32BitGraphicsMemoryImpl(const Allocatio
404404 MemoryPool::System4KBPagesWith32BitGpuAddressing, false );
405405
406406 allocation->set32BitAllocation (true );
407- allocation->setGpuBaseAddress (GmmHelper::canonize (gfxPartition. getHeapBase (allocatorToUse)));
407+ allocation->setGpuBaseAddress (GmmHelper::canonize (gfxPartition-> getHeapBase (allocatorToUse)));
408408 allocation->setDriverAllocatedCpuPtr (ptrAlloc);
409409 return allocation;
410410}
@@ -480,7 +480,7 @@ GraphicsAllocation *DrmMemoryManager::createGraphicsAllocationFromSharedHandle(o
480480 drmAllocation->set32BitAllocation (true );
481481 drmAllocation->setGpuBaseAddress (getExternalHeapBaseAddress ());
482482 } else if (isLimitedRange ()) {
483- drmAllocation->setGpuBaseAddress (gfxPartition. getHeapBase (HeapIndex::HEAP_STANDARD));
483+ drmAllocation->setGpuBaseAddress (gfxPartition-> getHeapBase (HeapIndex::HEAP_STANDARD));
484484 }
485485
486486 if (properties.imgInfo ) {
@@ -570,7 +570,7 @@ void DrmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation)
570570 void *reserveAddress = gfxAllocation->getReservedAddressPtr ();
571571 if (reserveAddress) {
572572 auto gpuAddressToFree = GmmHelper::decanonize (reinterpret_cast <uint64_t >(reserveAddress));
573- gfxPartition. freeGpuAddressRange (gpuAddressToFree, gfxAllocation->getReservedAddressSize ());
573+ gfxPartition-> freeGpuAddressRange (gpuAddressToFree, gfxAllocation->getReservedAddressSize ());
574574 }
575575 delete gfxAllocation;
576576
0 commit comments