diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index 391c05dc6c..89d49c48cc 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -431,7 +431,6 @@ DECLARE_DEBUG_VARIABLE(int32_t, ForcePostSyncL1Flush, -1, "-1: default (do nothi DECLARE_DEBUG_VARIABLE(int32_t, AllowNotZeroForCompressedOnWddm, -1, "-1: default (do nothing), 0: do not set AllowNotZeroed for compressed resources, 1: set AllowNotZeroed for compressed resources"); DECLARE_DEBUG_VARIABLE(int32_t, ForceWddmHugeChunkSizeMB, -1, "-1: default (do nothing), >0: set given huge chunk size in MegaBytes for WDDM"); DECLARE_DEBUG_VARIABLE(int64_t, ForceGmmSystemMemoryBufferForAllocations, 0, "0: default, >0: (bitmask) for given Allocation Types, force GMM_RESOURCE_USAGE_OCL_SYSTEM_MEMORY_BUFFER gmm resource type"); -DECLARE_DEBUG_VARIABLE(int32_t, ForceLowLatencyHint, -1, "Force passing low latency hint during xe_exec_queue creation. -1: default, 0: disabled, 1: enabled"); /*DIRECT SUBMISSION FLAGS*/ DECLARE_DEBUG_VARIABLE(int32_t, EnableDirectSubmission, -1, "-1: default (disabled), 0: disable, 1:enable. Enables direct submission of command buffers bypassing KMD") diff --git a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp index 220ddba97d..f38ab4c089 100644 --- a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp +++ b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp @@ -211,17 +211,8 @@ bool IoctlHelperXe::initialize() { xeLog("DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY\t\t%#llx\n", config->info[DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY]); - xeLog(" DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY\t%s\n", - config->info[DRM_XE_QUERY_CONFIG_FLAGS] & - DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY - ? "ON" - : "OFF"); maxExecQueuePriority = config->info[DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY] & 0xffff; - isLowLatencyHintAvailable = config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY; - if (debugManager.flags.ForceLowLatencyHint.get() != -1) { - isLowLatencyHintAvailable = !!debugManager.flags.ForceLowLatencyHint.get(); - } memset(&queryConfig, 0, sizeof(queryConfig)); queryConfig.query = DRM_XE_DEVICE_QUERY_HWCONFIG; @@ -1382,12 +1373,6 @@ void IoctlHelperXe::xeShowBindTable() { } } -void IoctlHelperXe::applyContextFlags(void *execQueueCreate, bool allocateInterrupt) { - if (this->isLowLatencyHintAvailable) { - reinterpret_cast(execQueueCreate)->flags |= DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT; - } -} - int IoctlHelperXe::createDrmContext(Drm &drm, OsContextLinux &osContext, uint32_t drmVmId, uint32_t deviceIndex, bool allocateInterrupt) { uint32_t drmContextId = 0; diff --git a/shared/source/os_interface/linux/xe/ioctl_helper_xe.h b/shared/source/os_interface/linux/xe/ioctl_helper_xe.h index a27a7dfb39..f995eebe85 100644 --- a/shared/source/os_interface/linux/xe/ioctl_helper_xe.h +++ b/shared/source/os_interface/linux/xe/ioctl_helper_xe.h @@ -177,7 +177,7 @@ class IoctlHelperXe : public IoctlHelper { uint16_t getDefaultEngineClass(const aub_stream::EngineType &defaultEngineType); void setOptionalContextProperties(Drm &drm, void *extProperties, uint32_t &extIndexInOut); virtual void setContextProperties(const OsContextLinux &osContext, uint32_t deviceIndex, void *extProperties, uint32_t &extIndexInOut); - virtual void applyContextFlags(void *execQueueCreate, bool allocateInterrupt); + virtual void applyContextFlags(void *execQueueCreate, bool allocateInterrupt){}; struct GtIpVersion { uint16_t major; @@ -186,7 +186,6 @@ class IoctlHelperXe : public IoctlHelper { }; bool queryHwIpVersion(GtIpVersion >IpVersion); - bool isLowLatencyHintAvailable = false; int maxExecQueuePriority = 0; std::mutex xeLock; std::mutex gemCloseLock; diff --git a/shared/test/common/os_interface/linux/xe/mock_ioctl_helper_xe.h b/shared/test/common/os_interface/linux/xe/mock_ioctl_helper_xe.h index 2ae0174e12..375ca587f7 100644 --- a/shared/test/common/os_interface/linux/xe/mock_ioctl_helper_xe.h +++ b/shared/test/common/os_interface/linux/xe/mock_ioctl_helper_xe.h @@ -19,7 +19,6 @@ struct MockIoctlHelperXe : IoctlHelperXe { using IoctlHelperXe::getFdFromVmExport; using IoctlHelperXe::ioctl; using IoctlHelperXe::IoctlHelperXe; - using IoctlHelperXe::isLowLatencyHintAvailable; using IoctlHelperXe::maxContextSetProperties; using IoctlHelperXe::maxExecQueuePriority; using IoctlHelperXe::queryGtListData; diff --git a/shared/test/common/test_files/igdrcl.config b/shared/test/common/test_files/igdrcl.config index 838f15d9ec..875c6bad55 100644 --- a/shared/test/common/test_files/igdrcl.config +++ b/shared/test/common/test_files/igdrcl.config @@ -655,7 +655,6 @@ PipelinedEuThreadArbitration = -1 ExperimentalUSMAllocationReuseCleaner = -1 DummyPageBackingEnabled = 0 EnableDeferBacking = 0 -ForceLowLatencyHint = -1 SetMaxBVHLevels = -1 GetSipBinaryFromExternalLib = -1 LogUsmReuse = 0 diff --git a/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp b/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp index 429e31d44c..ad451ef1a9 100644 --- a/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp @@ -2897,74 +2897,3 @@ TEST_F(IoctlHelperXeTest, givenXeIoctlHelperAndDeferBackingFlagSetToTrueWhenMake auto xeIoctlHelper = std::make_unique(drm); EXPECT_TRUE(xeIoctlHelper->makeResidentBeforeLockNeeded()); } - -TEST_F(IoctlHelperXeTest, givenXeIoctlHelperWhenCreateDrmContextAndLowLatencyHintNotAvailableThenNoFlagIsSet) { - class MockLinuxOsContext : public OsContextLinux { - public: - using OsContextLinux::initializeContext; - using OsContextLinux::OsContextLinux; - }; - - auto executionEnvironment = std::make_unique(); - auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]); - auto xeIoctlHelper = static_cast(drm->getIoctlHelper()); - xeIoctlHelper->contextParamEngine.push_back(drm_xe_engine_class_instance{}); - MockLinuxOsContext osContext(*drm, 0, 5u, NEO::EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular})); - - osContext.initializeContext(false); - EXPECT_EQ(0u, drm->latestExecQueueCreate.flags); -} - -TEST_F(IoctlHelperXeTest, givenXeIoctlHelperWhenCreateDrmContextAndLowLatencyHintAvailableThenFlagIsSet) { - class MockLinuxOsContext : public OsContextLinux { - public: - using OsContextLinux::initializeContext; - using OsContextLinux::OsContextLinux; - }; - - auto executionEnvironment = std::make_unique(); - auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]); - auto xeIoctlHelper = static_cast(drm->getIoctlHelper()); - xeIoctlHelper->contextParamEngine.push_back(drm_xe_engine_class_instance{}); - MockLinuxOsContext osContext(*drm, 0, 5u, NEO::EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular})); - - xeIoctlHelper->isLowLatencyHintAvailable = true; - osContext.initializeContext(false); - EXPECT_EQ(static_cast(DRM_XE_EXEC_QUEUE_LOW_LATENCY_HINT), drm->latestExecQueueCreate.flags); -} - -TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyNotAvailableThenFlagNotSet) { - auto executionEnvironment = std::make_unique(); - auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]); - auto xeIoctlHelper = static_cast(drm->getIoctlHelper()); - - auto xeQueryConfig = reinterpret_cast(drm->queryConfig); - xeQueryConfig->info[DRM_XE_QUERY_CONFIG_FLAGS] = 0; - xeIoctlHelper->initialize(); - EXPECT_FALSE(static_cast(xeIoctlHelper)->isLowLatencyHintAvailable); -} - -TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyAvailableThenFlagSet) { - auto executionEnvironment = std::make_unique(); - auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]); - auto xeIoctlHelper = static_cast(drm->getIoctlHelper()); - - auto xeQueryConfig = reinterpret_cast(drm->queryConfig); - xeQueryConfig->info[DRM_XE_QUERY_CONFIG_FLAGS] = DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY; - xeIoctlHelper->initialize(); - EXPECT_TRUE(static_cast(xeIoctlHelper)->isLowLatencyHintAvailable); -} - -TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyAvailableButDebugFlagEnabledThenFlagNotSet) { - DebugManagerStateRestore restorer{}; - debugManager.flags.ForceLowLatencyHint.set(0); - - auto executionEnvironment = std::make_unique(); - auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]); - auto xeIoctlHelper = static_cast(drm->getIoctlHelper()); - - auto xeQueryConfig = reinterpret_cast(drm->queryConfig); - xeQueryConfig->info[DRM_XE_QUERY_CONFIG_FLAGS] = DRM_XE_QUERY_CONFIG_FLAG_HAS_LOW_LATENCY; - xeIoctlHelper->initialize(); - EXPECT_FALSE(static_cast(xeIoctlHelper)->isLowLatencyHintAvailable); -}