Share reserved CPU address space region among GfxPartitions

Related-To: NEO-4525

Change-Id: Id7534e317a10849c08ec29a090d782dcc4fabced
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
Igor Venevtsev
2020-08-12 12:18:34 +02:00
committed by sys_ocldev
parent b09872f595
commit 8a73b072b4
9 changed files with 70 additions and 9 deletions

View File

@ -677,7 +677,7 @@ TEST_F(DrmMemoryManagerFailInjectionTest, givenEnabledLocalMemoryWhenNewFailsThe
mock->ioctl_expected.total = -1; //don't care
class MockGfxPartition : public GfxPartition {
public:
MockGfxPartition() {
MockGfxPartition() : GfxPartition(reservedCpuAddressRange) {
init(defaultHwInfo->capabilityTable.gpuAddressSpace, getSizeToReserve(), 0, 1);
}
~MockGfxPartition() override {
@ -691,6 +691,7 @@ TEST_F(DrmMemoryManagerFailInjectionTest, givenEnabledLocalMemoryWhenNewFailsThe
struct MockHeap : Heap {
using Heap::alloc;
};
OSMemory::ReservedCpuAddressRange reservedCpuAddressRange;
};
TestedDrmMemoryManager testedMemoryManager(true, false, true, *executionEnvironment);
testedMemoryManager.overrideGfxPartition(new MockGfxPartition);