From 816e95443f415218c7c3f9d4a09323bcf528247e Mon Sep 17 00:00:00 2001 From: Lukasz Jobczyk Date: Thu, 1 Jul 2021 15:18:23 +0000 Subject: [PATCH] Add missing ioctl to kmd migrated resource Signed-off-by: Lukasz Jobczyk --- .../linux/drm_memory_manager_tests.cpp | 29 ------------------- .../os_interface/linux/drm_memory_manager.cpp | 3 +- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp index 7cee011226..5e6ac29b76 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_memory_manager_tests.cpp @@ -92,48 +92,19 @@ TEST_F(DrmMemoryManagerTest, givenDebugVariableWhenCreatingDrmMemoryManagerThenS TEST_F(DrmMemoryManagerTest, givenDrmMemoryManagerWhenCheckForKmdMigrationThenCorrectValueIsReturned) { DebugManagerStateRestore restorer; - auto drm = static_cast(executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->osInterface->getDriverModel()->as()); - - { - DebugManager.flags.UseKmdMigration.set(-1); - - drm->bindAvailable = false; - auto retVal = memoryManager->isKmdMigrationAvailable(rootDeviceIndex); - - EXPECT_FALSE(retVal); - - drm->bindAvailable = true; - retVal = memoryManager->isKmdMigrationAvailable(rootDeviceIndex); - - auto hwInfo = executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo(); - auto &hwHelper = NEO::HwHelper::get(hwInfo->platform.eRenderCoreFamily); - EXPECT_EQ(hwHelper.isKmdMigrationSupported(*hwInfo), retVal); - } { DebugManager.flags.UseKmdMigration.set(1); - drm->bindAvailable = false; auto retVal = memoryManager->isKmdMigrationAvailable(rootDeviceIndex); EXPECT_TRUE(retVal); - - drm->bindAvailable = true; - retVal = memoryManager->isKmdMigrationAvailable(rootDeviceIndex); - - EXPECT_TRUE(retVal); } { DebugManager.flags.UseKmdMigration.set(0); - drm->bindAvailable = false; auto retVal = memoryManager->isKmdMigrationAvailable(rootDeviceIndex); EXPECT_FALSE(retVal); - - drm->bindAvailable = true; - retVal = memoryManager->isKmdMigrationAvailable(rootDeviceIndex); - - EXPECT_FALSE(retVal); } this->dontTestIoctlInTearDown = true; diff --git a/shared/source/os_interface/linux/drm_memory_manager.cpp b/shared/source/os_interface/linux/drm_memory_manager.cpp index 0c74cbc757..7466314eb2 100644 --- a/shared/source/os_interface/linux/drm_memory_manager.cpp +++ b/shared/source/os_interface/linux/drm_memory_manager.cpp @@ -191,8 +191,7 @@ bool DrmMemoryManager::isKmdMigrationAvailable(uint32_t rootDeviceIndex) { auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo(); auto &hwHelper = NEO::HwHelper::get(hwInfo->platform.eRenderCoreFamily); - auto useKmdMigration = hwHelper.isKmdMigrationSupported(*hwInfo) && - this->getDrm(rootDeviceIndex).isVmBindAvailable(); + auto useKmdMigration = hwHelper.isKmdMigrationSupported(*hwInfo); if (DebugManager.flags.UseKmdMigration.get() != -1) { useKmdMigration = DebugManager.flags.UseKmdMigration.get();