Check if new residency model is supported in kernel

Related-To: NEO-5007

Change-Id: Ia01e74ed8c314acf71f972b4b55a88a5f4556f08
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2020-08-25 08:48:18 +02:00
committed by sys_ocldev
parent 856a2f7be7
commit 2e5c5b5f29
15 changed files with 54 additions and 40 deletions

View File

@ -37,9 +37,10 @@ TEST(DrmMemoryManagerTest, givenDrmMemoryManagerWhenSharedAllocationIsCreatedFro
};
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create();
auto mock = new MockDrm(0, *executionEnvironment.rootDeviceEnvironments[0]);
executionEnvironment.rootDeviceEnvironments[0]->osInterface->get()->setDrm(mock);
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*mock);
auto memoryManager = std::make_unique<TestedDrmMemoryManager>(executionEnvironment);
osHandle handle = 3;
@ -103,9 +104,10 @@ TEST(DrmMemoryManagerTest, givenMultipleThreadsWhenSharedAllocationIsCreatedThen
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create();
auto mock = new MockDrm(0, *executionEnvironment.rootDeviceEnvironments[0]);
executionEnvironment.rootDeviceEnvironments[0]->osInterface->get()->setDrm(mock);
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*mock);
auto memoryManager = std::make_unique<TestedDrmMemoryManager>(executionEnvironment);
osHandle handle = 3;