From 51f7fbe0eca39c6618f9558515d19511b23e4d56 Mon Sep 17 00:00:00 2001 From: Michal Mrozek Date: Fri, 15 Nov 2019 08:29:02 +0100 Subject: [PATCH] Remove not needed debug flag. Change-Id: I2cfb1cf531654045242f64f045f6f8ff2cc10d9a Signed-off-by: Michal Mrozek --- runtime/os_interface/debug_variables_base.inl | 1 - runtime/os_interface/linux/drm_allocation.cpp | 7 +------ unit_tests/os_interface/linux/drm_memory_manager_tests.cpp | 6 ------ unit_tests/test_files/igdrcl.config | 1 - 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/runtime/os_interface/debug_variables_base.inl b/runtime/os_interface/debug_variables_base.inl index fa9c3461dc..3d40f7e093 100644 --- a/runtime/os_interface/debug_variables_base.inl +++ b/runtime/os_interface/debug_variables_base.inl @@ -103,7 +103,6 @@ DECLARE_DEBUG_VARIABLE(bool, EnableVaLibCalls, true, "Enable cl-va sharing lib c DECLARE_DEBUG_VARIABLE(bool, EnableExtendedVaFormats, false, "Enable more formats in cl-va sharing") DECLARE_DEBUG_VARIABLE(bool, AddClGlSharing, false, "Add cl-gl extension") DECLARE_DEBUG_VARIABLE(bool, EnableFormatQuery, false, "Enable sharing format querying") -DECLARE_DEBUG_VARIABLE(bool, AllowOpenFdOperations, false, "When enabled driver is allowed to call DRM_IOCTL_PRIME_HANDLE_TO_FD.") DECLARE_DEBUG_VARIABLE(bool, EnableFreeMemory, false, "Enable freeMemory in memory manager") DECLARE_DEBUG_VARIABLE(bool, ForceSamplerLowFilteringPrecision, false, "Force Low Filtering Precision Sampler mode") DECLARE_DEBUG_VARIABLE(int32_t, EnableIntelVme, -1, "-1: default, 0: disabled, 1: Enables cl_intel_motion_estimation extension") diff --git a/runtime/os_interface/linux/drm_allocation.cpp b/runtime/os_interface/linux/drm_allocation.cpp index 53f69e6a5f..1c608aac82 100644 --- a/runtime/os_interface/linux/drm_allocation.cpp +++ b/runtime/os_interface/linux/drm_allocation.cpp @@ -24,11 +24,6 @@ std::string DrmAllocation::getAllocationInfoString() const { } uint64_t DrmAllocation::peekInternalHandle(MemoryManager *memoryManager) { - auto drmMemoryManager = static_cast(memoryManager); - if (DebugManager.flags.AllowOpenFdOperations.get()) { - return static_cast(drmMemoryManager->obtainFdFromHandle(getBO()->peekHandle())); - } else { - return 0llu; - } + return static_cast((static_cast(memoryManager))->obtainFdFromHandle(getBO()->peekHandle())); } } // namespace NEO diff --git a/unit_tests/os_interface/linux/drm_memory_manager_tests.cpp b/unit_tests/os_interface/linux/drm_memory_manager_tests.cpp index e3ef6e34a1..37ed3a8b47 100644 --- a/unit_tests/os_interface/linux/drm_memory_manager_tests.cpp +++ b/unit_tests/os_interface/linux/drm_memory_manager_tests.cpp @@ -148,8 +148,6 @@ TEST_F(DrmMemoryManagerTest, pinAfterAllocateWhenAskedAndAllowedAndBigAllocation } TEST_F(DrmMemoryManagerTest, whenPeekInternalHandleIsCalledThenBoIsReturend) { - DebugManagerStateRestore restore; - DebugManager.flags.AllowOpenFdOperations.set(1); mock->ioctl_expected.gemUserptr = 1; mock->ioctl_expected.gemWait = 1; mock->ioctl_expected.gemClose = 1; @@ -159,8 +157,6 @@ TEST_F(DrmMemoryManagerTest, whenPeekInternalHandleIsCalledThenBoIsReturend) { ASSERT_NE(allocation->getBO(), nullptr); ASSERT_EQ(allocation->peekInternalHandle(this->memoryManager), static_cast(1337)); - DebugManager.flags.AllowOpenFdOperations.set(0); - ASSERT_EQ(allocation->peekInternalHandle(this->memoryManager), 0llu); memoryManager->freeGraphicsMemory(allocation); } @@ -1061,8 +1057,6 @@ TEST_F(DrmMemoryManagerTest, GivenSizeAbove2GBWhenAllocHostPtrAndUseHostPtrAreCr } TEST_F(DrmMemoryManagerTest, givenDrmBufferWhenItIsQueriedForInternalAllocationThenBoIsReturned) { - DebugManagerStateRestore restore; - DebugManager.flags.AllowOpenFdOperations.set(1); mock->ioctl_expected.total = -1; mock->outputFd = 1337; MockContext context; diff --git a/unit_tests/test_files/igdrcl.config b/unit_tests/test_files/igdrcl.config index 1afb005b7d..5b84faf9da 100644 --- a/unit_tests/test_files/igdrcl.config +++ b/unit_tests/test_files/igdrcl.config @@ -112,7 +112,6 @@ EnableHostPtrTracking = 1 DisableDcFlushInEpilogue = 0 OverrideInvalidEngineWithDefault = 0 EnableFormatQuery = 0 -AllowOpenFdOperations = 0 EnableBlitterOperationsSupport = -1 EnableBlitterOperationsForReadWriteBuffers = -1 DisableAuxTranslation = 0