From d20e3af1879156be93f83338f2f4523ecc88e338 Mon Sep 17 00:00:00 2001 From: Lukasz Jobczyk Date: Tue, 22 Sep 2020 12:42:19 +0200 Subject: [PATCH] Enable gem close worker on direct submission Related-To: NEO-5112 Change-Id: I1b6950d0308d98cca09051d6fea46d51c10d2a6a Signed-off-by: Lukasz Jobczyk --- .../os_interface/linux/device_command_stream.inl | 4 +--- .../linux/device_command_stream_tests.cpp | 11 ----------- .../os_interface/linux/drm_memory_manager_tests.cpp | 1 - .../source/os_interface/linux/drm_memory_manager.cpp | 1 - 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/opencl/source/os_interface/linux/device_command_stream.inl b/opencl/source/os_interface/linux/device_command_stream.inl index 453d909135..1229d93cc9 100644 --- a/opencl/source/os_interface/linux/device_command_stream.inl +++ b/opencl/source/os_interface/linux/device_command_stream.inl @@ -6,7 +6,6 @@ */ #include "shared/source/command_stream/device_command_stream.h" -#include "shared/source/debug_settings/debug_settings_manager.h" #include "opencl/source/command_stream/command_stream_receiver_with_aub_dump.h" #include "opencl/source/os_interface/linux/drm_command_stream.h" @@ -18,8 +17,7 @@ CommandStreamReceiver *DeviceCommandStreamReceiver::create(bool withA if (withAubDump) { return new CommandStreamReceiverWithAUBDump>("aubfile", executionEnvironment, rootDeviceIndex); } else { - auto gemMode = DebugManager.flags.EnableDirectSubmission.get() == 1 ? gemCloseWorkerMode::gemCloseWorkerInactive : gemCloseWorkerMode::gemCloseWorkerActive; - return new DrmCommandStreamReceiver(executionEnvironment, rootDeviceIndex, gemMode); + return new DrmCommandStreamReceiver(executionEnvironment, rootDeviceIndex); } }; } // namespace NEO diff --git a/opencl/test/unit_test/os_interface/linux/device_command_stream_tests.cpp b/opencl/test/unit_test/os_interface/linux/device_command_stream_tests.cpp index 8f4afa17ad..3778f7f941 100644 --- a/opencl/test/unit_test/os_interface/linux/device_command_stream_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/device_command_stream_tests.cpp @@ -9,7 +9,6 @@ #include "shared/source/command_stream/device_command_stream.h" #include "shared/source/command_stream/linear_stream.h" #include "shared/source/os_interface/linux/os_interface.h" -#include "shared/test/unit_test/helpers/debug_manager_state_restore.h" #include "opencl/source/command_stream/aub_command_stream_receiver.h" #include "opencl/source/os_interface/linux/device_command_stream.inl" @@ -63,16 +62,6 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultDrmCsrWhenOsInterfaceIsNullpt EXPECT_EQ(drmCsr->getOSInterface()->get()->getDrm(), executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->getDrm()); } -HWTEST_F(DeviceCommandStreamLeaksTest, givenEnableDirectSubmissionWhenCsrIsCreatedThenGemCloseWorkerInactiveModeIsSelected) { - DebugManagerStateRestore restorer; - DebugManager.flags.EnableDirectSubmission.set(1u); - - std::unique_ptr ptr(DeviceCommandStreamReceiver::create(false, *executionEnvironment, 0)); - auto drmCsr = (DrmCommandStreamReceiver *)ptr.get(); - - EXPECT_EQ(drmCsr->peekGemCloseWorkerOperationMode(), gemCloseWorkerMode::gemCloseWorkerInactive); -} - using DeviceCommandStreamSetInternalUsageTests = DeviceCommandStreamLeaksTest; HWTEST_F(DeviceCommandStreamSetInternalUsageTests, givenValidDrmCsrThenGemCloseWorkerOperationModeIsSetToInactiveWhenInternalUsageIsSet) { 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 53aa30657e..5838df0e75 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 @@ -2857,7 +2857,6 @@ TEST_F(DrmMemoryManagerBasic, givenEnabledDirectSubmissionWhenMemoryManagerIsCre EXPECT_FALSE(memoryManager.isValidateHostMemoryEnabled()); EXPECT_FALSE(memoryManager.forcePinEnabled); - EXPECT_EQ(memoryManager.peekGemCloseWorker(), nullptr); } TEST_F(DrmMemoryManagerBasic, givenEnabledAsyncDeleterFlagWhenMemoryManagerIsCreatedThenAsyncDeleterEnabledIsFalseAndDeleterIsNullptr) { diff --git a/shared/source/os_interface/linux/drm_memory_manager.cpp b/shared/source/os_interface/linux/drm_memory_manager.cpp index 25ef47b64f..38b431c81a 100644 --- a/shared/source/os_interface/linux/drm_memory_manager.cpp +++ b/shared/source/os_interface/linux/drm_memory_manager.cpp @@ -39,7 +39,6 @@ DrmMemoryManager::DrmMemoryManager(gemCloseWorkerMode mode, forcePinEnabled(forcePinAllowed), validateHostPtrMemory(validateHostPtrMemory) { if (DebugManager.flags.EnableDirectSubmission.get() == 1) { - mode = gemCloseWorkerMode::gemCloseWorkerInactive; this->forcePinEnabled = false; this->validateHostPtrMemory = false; }