From 90be39c9c02e6668140b4fe36190738eb7391f2d Mon Sep 17 00:00:00 2001 From: Szymon Morek Date: Mon, 1 Sep 2025 11:02:50 +0000 Subject: [PATCH] performance: enable low latency hint on Xe Related-To: NEO-14708 Signed-off-by: Szymon Morek --- shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp | 2 +- .../unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 4e74032702..6bbbb2450f 100644 --- a/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp +++ b/shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp @@ -221,7 +221,7 @@ bool IoctlHelperXe::initialize() { : "OFF"); maxExecQueuePriority = config->info[DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY] & 0xffff; - isLowLatencyHintAvailable = false; + 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(); } 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 9f9416cac6..3c66ab28ef 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 @@ -3062,7 +3062,7 @@ TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyNotAvailableThen EXPECT_FALSE(static_cast(xeIoctlHelper)->isLowLatencyHintAvailable); } -TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyAvailableThenFlagNotSet) { +TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyAvailableThenFlagSet) { auto executionEnvironment = std::make_unique(); auto drm = DrmMockXe::create(*executionEnvironment->rootDeviceEnvironments[0]); auto xeIoctlHelper = static_cast(drm->getIoctlHelper()); @@ -3070,7 +3070,7 @@ TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyAvailableThenFla 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); + EXPECT_TRUE(static_cast(xeIoctlHelper)->isLowLatencyHintAvailable); } TEST_F(IoctlHelperXeTest, whenInitializeIoctlHelperAndLowLatencyAvailableButDebugFlagEnabledThenFlagNotSet) {