Skip to content

Commit 888358b

Browse files
fix: Disable related logic when EnableHostAllocationMemPolicy is not set
Signed-off-by: Filip Hazubski <[email protected]> Source: d920753
1 parent 8d1d7c7 commit 888358b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

shared/source/os_interface/linux/drm_memory_manager.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,9 @@ GraphicsAllocation *DrmMemoryManager::allocateUSMHostGraphicsMemory(const Alloca
451451
bo->peekAddress(),
452452
cSize,
453453
MemoryPool::system4KBPages);
454-
allocation->setUsmHostAllocation(true);
454+
if (debugManager.flags.EnableHostAllocationMemPolicy.get()) {
455+
allocation->setUsmHostAllocation(true);
456+
}
455457
allocation->setReservedAddressRange(reinterpret_cast<void *>(gpuAddress), cSize);
456458
bo.release();
457459

@@ -1734,7 +1736,9 @@ inline std::unique_ptr<DrmAllocation> DrmMemoryManager::makeDrmAllocation(const
17341736
allocation->storageInfo = allocationData.storageInfo;
17351737
allocation->setFlushL3Required(allocationData.flags.flushL3);
17361738
allocation->setUncacheable(allocationData.flags.uncacheable);
1737-
allocation->setUsmHostAllocation(allocationData.flags.isUSMHostAllocation);
1739+
if (debugManager.flags.EnableHostAllocationMemPolicy.get()) {
1740+
allocation->setUsmHostAllocation(allocationData.flags.isUSMHostAllocation);
1741+
}
17381742

17391743
return allocation;
17401744
}

0 commit comments

Comments
 (0)