mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
fix: Create GMM in DrmMemoryManager::createAllocWithAlignment
Resolves: NEO-9739 Related-To: NEO-9543 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5664b764f0
commit
add394722c
@@ -2206,6 +2206,9 @@ DrmAllocation *DrmMemoryManager::createAllocWithAlignment(const AllocationData &
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto gmm = makeGmmIfSingleHandle(allocationData, alignedSize);
|
||||
allocation->setDefaultGmm(gmm.release());
|
||||
|
||||
bo.release();
|
||||
allocation->isShareableHostMemory = true;
|
||||
allocation->storageInfo = allocationData.storageInfo;
|
||||
|
||||
@@ -1461,6 +1461,7 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenAlignmentAndSizeWhenMmapRetur
|
||||
|
||||
munmapCalledCount = 0;
|
||||
auto allocation = memoryManager->createAllocWithAlignment(allocationData, MemoryConstants::pageSize, MemoryConstants::pageSize64k, MemoryConstants::pageSize64k, 0u);
|
||||
EXPECT_NE(allocation->getDefaultGmm(), nullptr);
|
||||
|
||||
EXPECT_EQ(alignUp(reinterpret_cast<void *>(0x12345678), MemoryConstants::pageSize64k), allocation->getMmapPtr());
|
||||
EXPECT_EQ(1u, munmapCalledCount);
|
||||
|
||||
Reference in New Issue
Block a user