From 82096a5472cefddf400cd3390fb2cf196911f0fa Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Fri, 17 Dec 2021 18:42:13 +0000 Subject: [PATCH] Add new KMD delay parameter for direct submission Related-To: NEO-5845 Signed-off-by: Zbigniew Zdanowicz --- .../gen11/test_device_caps_gen11.cpp | 2 + .../gen12lp/test_device_caps_gen12lp.inl | 2 + .../windows/test_device_caps_bdw_windows.cpp | 2 + .../unit_test/gen8/test_device_caps_gen8.cpp | 2 + .../windows/test_device_caps_bxt_windows.cpp | 2 + .../cfl/linux/hw_info_config_tests_cfl.cpp | 2 + .../windows/test_device_caps_cfl_windows.cpp | 2 + .../glk/linux/hw_info_config_tests_glk.cpp | 2 + .../windows/test_device_caps_glk_windows.cpp | 2 + .../kbl/linux/hw_info_config_tests_kbl.cpp | 2 + .../windows/test_device_caps_kbl_windows.cpp | 2 + .../skl/linux/hw_info_config_tests_skl.cpp | 2 + .../windows/test_device_caps_skl_windows.cpp | 2 + .../unit_test/helpers/kmd_notify_tests.cpp | 89 +++++++++++++----- .../os_interface/device_factory_tests.cpp | 10 +++ .../test/unit_test/test_files/igdrcl.config | 2 + .../command_stream_receiver_hw_base.inl | 3 +- .../debug_settings/debug_variables_base.inl | 2 + shared/source/gen11/hw_info_ehl.cpp | 6 +- shared/source/gen11/hw_info_icllp.cpp | 6 +- shared/source/gen11/hw_info_lkf.cpp | 6 +- shared/source/gen12lp/hw_info_adlp.cpp | 6 +- shared/source/gen12lp/hw_info_adls.cpp | 6 +- shared/source/gen12lp/hw_info_dg1.cpp | 6 +- shared/source/gen12lp/hw_info_rkl.cpp | 6 +- shared/source/gen12lp/hw_info_tgllp.cpp | 6 +- shared/source/gen8/hw_info_bdw.cpp | 90 +++++++++---------- shared/source/gen9/hw_info_bxt.cpp | 6 +- shared/source/gen9/hw_info_cfl.cpp | 6 +- shared/source/gen9/hw_info_glk.cpp | 6 +- shared/source/gen9/hw_info_kbl.cpp | 6 +- shared/source/gen9/hw_info_skl.cpp | 6 +- shared/source/helpers/hw_info.h | 6 +- .../source/helpers/kmd_notify_properties.cpp | 5 +- shared/source/helpers/kmd_notify_properties.h | 6 +- .../os_interface/linux/hw_info_config_drm.cpp | 2 + .../windows/hw_info_config_wddm.cpp | 2 + .../source/xe_hp_core/hw_info_xe_hp_sdv.cpp | 6 +- shared/source/xe_hpc_core/hw_info_pvc.cpp | 6 +- shared/source/xe_hpg_core/hw_info_dg2.cpp | 6 +- 40 files changed, 219 insertions(+), 120 deletions(-) diff --git a/opencl/test/unit_test/gen11/test_device_caps_gen11.cpp b/opencl/test/unit_test/gen11/test_device_caps_gen11.cpp index 950a525d05..216742dc02 100644 --- a/opencl/test/unit_test/gen11/test_device_caps_gen11.cpp +++ b/opencl/test/unit_test/gen11/test_device_caps_gen11.cpp @@ -30,6 +30,8 @@ GEN11TEST_F(Gen11DeviceCaps, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } GEN11TEST_F(Gen11DeviceCaps, WhenCheckingCompressionThenItIsDisabled) { diff --git a/opencl/test/unit_test/gen12lp/test_device_caps_gen12lp.inl b/opencl/test/unit_test/gen12lp/test_device_caps_gen12lp.inl index 4fbbe18360..a7ba943932 100644 --- a/opencl/test/unit_test/gen12lp/test_device_caps_gen12lp.inl +++ b/opencl/test/unit_test/gen12lp/test_device_caps_gen12lp.inl @@ -61,6 +61,8 @@ GEN12LPTEST_F(Gen12LpDeviceCaps, WhenCheckingCapsThenKmdNotifyMechanismIsCorrect EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } GEN12LPTEST_F(Gen12LpDeviceCaps, WhenCheckingCapsThenCompressionIsDisabled) { diff --git a/opencl/test/unit_test/gen8/bdw/windows/test_device_caps_bdw_windows.cpp b/opencl/test/unit_test/gen8/bdw/windows/test_device_caps_bdw_windows.cpp index 4f04fc1fc3..fefcef394d 100644 --- a/opencl/test/unit_test/gen8/bdw/windows/test_device_caps_bdw_windows.cpp +++ b/opencl/test/unit_test/gen8/bdw/windows/test_device_caps_bdw_windows.cpp @@ -21,4 +21,6 @@ BDWTEST_F(BdwDeviceCaps, WhenCheckingKmdNotifyPropertiesThenKmdNotifyIsEnabledCo EXPECT_EQ(5000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(200000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } diff --git a/opencl/test/unit_test/gen8/test_device_caps_gen8.cpp b/opencl/test/unit_test/gen8/test_device_caps_gen8.cpp index 2002f445a8..683b103009 100644 --- a/opencl/test/unit_test/gen8/test_device_caps_gen8.cpp +++ b/opencl/test/unit_test/gen8/test_device_caps_gen8.cpp @@ -44,6 +44,8 @@ GEN8TEST_F(Gen8DeviceCaps, WhenCheckingKmdNotifyMechanismThenPropertiesAreSetCor EXPECT_EQ(5000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(200000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } GEN8TEST_F(Gen8DeviceCaps, WhenCheckingCompressionThenItIsDisabled) { diff --git a/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp b/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp index 2481a3aad8..1327375fad 100644 --- a/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp +++ b/opencl/test/unit_test/gen9/bxt/windows/test_device_caps_bxt_windows.cpp @@ -20,4 +20,6 @@ BXTTEST_F(BxtDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisab EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } diff --git a/opencl/test/unit_test/gen9/cfl/linux/hw_info_config_tests_cfl.cpp b/opencl/test/unit_test/gen9/cfl/linux/hw_info_config_tests_cfl.cpp index 91a3252bbe..8ef1a5e463 100644 --- a/opencl/test/unit_test/gen9/cfl/linux/hw_info_config_tests_cfl.cpp +++ b/opencl/test/unit_test/gen9/cfl/linux/hw_info_config_tests_cfl.cpp @@ -95,6 +95,8 @@ CFLTEST_F(HwInfoConfigTestLinuxCfl, WhenConfiguringHwInfoThenInformationIsCorrec EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } CFLTEST_F(HwInfoConfigTestLinuxCfl, GivenUnknownDevIdWhenConfiguringHwInfoThenErrorIsReturned) { diff --git a/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp b/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp index 396c3e21c9..3f1587e56f 100644 --- a/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp +++ b/opencl/test/unit_test/gen9/cfl/windows/test_device_caps_cfl_windows.cpp @@ -20,4 +20,6 @@ CFLTEST_F(CflDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisab EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } diff --git a/opencl/test/unit_test/gen9/glk/linux/hw_info_config_tests_glk.cpp b/opencl/test/unit_test/gen9/glk/linux/hw_info_config_tests_glk.cpp index f79059e406..9a14c8a478 100644 --- a/opencl/test/unit_test/gen9/glk/linux/hw_info_config_tests_glk.cpp +++ b/opencl/test/unit_test/gen9/glk/linux/hw_info_config_tests_glk.cpp @@ -102,6 +102,8 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, WhenConfiguringHwInfoThenInformationIsCorrec EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } GLKTEST_F(HwInfoConfigTestLinuxGlk, GivenInvalidInputWhenConfiguringHwInfoThenErrorIsReturned) { diff --git a/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp b/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp index eeeaa5bd32..5f13789205 100644 --- a/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp +++ b/opencl/test/unit_test/gen9/glk/windows/test_device_caps_glk_windows.cpp @@ -20,4 +20,6 @@ GLKTEST_F(GlkDeviceCapsWindows, WhenCheckingKmdNotifyPropertiesThenKmdNotifyIsEn EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } diff --git a/opencl/test/unit_test/gen9/kbl/linux/hw_info_config_tests_kbl.cpp b/opencl/test/unit_test/gen9/kbl/linux/hw_info_config_tests_kbl.cpp index c36eb29ae6..a7fe2abe56 100644 --- a/opencl/test/unit_test/gen9/kbl/linux/hw_info_config_tests_kbl.cpp +++ b/opencl/test/unit_test/gen9/kbl/linux/hw_info_config_tests_kbl.cpp @@ -137,6 +137,8 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, WhenConfiguringHwInfoThenInformationIsCorrec EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } KBLTEST_F(HwInfoConfigTestLinuxKbl, GivenUnknownDevIdWhenConfiguringHwInfoThenErrorIsReturned) { diff --git a/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp b/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp index 54cebc9295..18d8cd2a4e 100644 --- a/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp +++ b/opencl/test/unit_test/gen9/kbl/windows/test_device_caps_kbl_windows.cpp @@ -20,4 +20,6 @@ KBLTEST_F(KblDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisab EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } diff --git a/opencl/test/unit_test/gen9/skl/linux/hw_info_config_tests_skl.cpp b/opencl/test/unit_test/gen9/skl/linux/hw_info_config_tests_skl.cpp index ee96fbf7a2..8fdffbcdb1 100644 --- a/opencl/test/unit_test/gen9/skl/linux/hw_info_config_tests_skl.cpp +++ b/opencl/test/unit_test/gen9/skl/linux/hw_info_config_tests_skl.cpp @@ -135,6 +135,8 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, WhenConfiguringHwInfoThenInformationIsCorrec EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } SKLTEST_F(HwInfoConfigTestLinuxSkl, GivenUnknownDevIdWhenConfiguringHwInfoThenErrorIsReturned) { diff --git a/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp b/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp index b5df040ed9..41696c56ec 100644 --- a/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp +++ b/opencl/test/unit_test/gen9/skl/windows/test_device_caps_skl_windows.cpp @@ -20,4 +20,6 @@ SKLTEST_F(SklDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisab EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } diff --git a/opencl/test/unit_test/helpers/kmd_notify_tests.cpp b/opencl/test/unit_test/helpers/kmd_notify_tests.cpp index 1e34748add..e85e44ace5 100644 --- a/opencl/test/unit_test/helpers/kmd_notify_tests.cpp +++ b/opencl/test/unit_test/helpers/kmd_notify_tests.cpp @@ -26,12 +26,13 @@ struct KmdNotifyTests : public ::testing::Test { cmdQ.reset(new MockCommandQueue(&context, device.get(), nullptr, false)); *device->getDefaultEngine().commandStreamReceiver->getTagAddress() = taskCountToWait; cmdQ->getGpgpuCommandStreamReceiver().waitForFlushStamp(flushStampToWait); - overrideKmdNotifyParams(true, 2, true, 1, false, 0); + overrideKmdNotifyParams(true, 2, true, 1, false, 0, false, 0); } void overrideKmdNotifyParams(bool kmdNotifyEnable, int64_t kmdNotifyDelay, bool quickKmdSleepEnable, int64_t quickKmdSleepDelay, - bool quickKmdSleepEnableForSporadicWaits, int64_t quickKmdSleepDelayForSporadicWaits) { + bool quickKmdSleepEnableForSporadicWaits, int64_t quickKmdSleepDelayForSporadicWaits, + bool quickKmdSleepEnableForDirectSubmission, int64_t quickKmdSleepDelayForDirectSubmission) { auto &properties = hwInfo->capabilityTable.kmdNotifyProperties; properties.enableKmdNotify = kmdNotifyEnable; properties.delayKmdNotifyMicroseconds = kmdNotifyDelay; @@ -39,6 +40,8 @@ struct KmdNotifyTests : public ::testing::Test { properties.delayQuickKmdSleepMicroseconds = quickKmdSleepDelay; properties.enableQuickKmdSleepForSporadicWaits = quickKmdSleepEnableForSporadicWaits; properties.delayQuickKmdSleepForSporadicWaitsMicroseconds = quickKmdSleepDelayForSporadicWaits; + properties.enableQuickKmdSleepForDirectSubmission = quickKmdSleepEnableForDirectSubmission; + properties.delayQuickKmdSleepForDirectSubmissionMicroseconds = quickKmdSleepDelayForDirectSubmission; } class MockKmdNotifyHelper : public KmdNotifyHelper { @@ -103,7 +106,7 @@ HWTEST_F(KmdNotifyTests, givenTaskCountWhenWaitUntilCompletionCalledThenAlwaysTr } HWTEST_F(KmdNotifyTests, givenTaskCountAndKmdNotifyDisabledWhenWaitUntilCompletionCalledThenTryCpuPollingWithoutTimeout) { - overrideKmdNotifyParams(false, 0, false, 0, false, 0); + overrideKmdNotifyParams(false, 0, false, 0, false, 0, false, 0); auto csr = createMockCsr(); EXPECT_CALL(*csr, waitForCompletionWithTimeout(false, 0, taskCountToWait)).Times(1).WillOnce(::testing::Return(true)); @@ -154,7 +157,7 @@ HWTEST_F(KmdNotifyTests, givenEnabledQuickSleepWhenWaitUntilCompleteIsCalledThen } HWTEST_F(KmdNotifyTests, givenDisabledQuickSleepWhenWaitUntilCompleteWithQuickSleepRequestIsCalledThenUseBaseDelayValue) { - overrideKmdNotifyParams(true, 1, false, 0, false, 0); + overrideKmdNotifyParams(true, 1, false, 0, false, 0, false, 0); auto csr = createMockCsr(); auto expectedTimeout = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds; @@ -180,7 +183,7 @@ HWTEST_F(KmdNotifyTests, givenZeroFlushStampWhenWaitIsCalledThenDisableTimeout) } HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsSporadicWaitThenOverrideQuickSleepRequest) { - overrideKmdNotifyParams(true, 3, true, 2, true, 1); + overrideKmdNotifyParams(true, 3, true, 2, true, 1, false, 0); auto csr = createMockCsr(); auto expectedDelay = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds; @@ -193,7 +196,7 @@ HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsSporadicWaitThenOverrid } HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsNotSporadicWaitThenOverrideQuickSleepRequest) { - overrideKmdNotifyParams(true, 3, true, 2, true, 9999999); + overrideKmdNotifyParams(true, 3, true, 2, true, 9999999, false, 0); auto csr = createMockCsr(); auto expectedDelay = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds; @@ -203,14 +206,14 @@ HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsNotSporadicWaitThenOver } HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenPowerSavingModeIsRequestedThenTimeoutIsEnabled) { - overrideKmdNotifyParams(false, 3, false, 2, false, 9999999); + overrideKmdNotifyParams(false, 3, false, 2, false, 9999999, false, 0); auto csr = createMockCsr(); EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, 1, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, true); } HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModeAndCallWaitThenTimeoutIsEnabled) { - overrideKmdNotifyParams(false, 3, false, 2, false, 9999999); + overrideKmdNotifyParams(false, 3, false, 2, false, 9999999, false, 0); auto csr = createMockCsr(); EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, 1, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); cmdQ->throttle = QueueThrottle::LOW; @@ -218,7 +221,7 @@ HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModeAndCal } HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModButThereIsNoFlushStampeAndCallWaitThenTimeoutIsDisabled) { - overrideKmdNotifyParams(false, 3, false, 2, false, 9999999); + overrideKmdNotifyParams(false, 3, false, 2, false, 9999999, false, 0); auto csr = createMockCsr(); EXPECT_CALL(*csr, waitForCompletionWithTimeout(false, 0, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); @@ -227,7 +230,7 @@ HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModButTher } HWTEST_F(KmdNotifyTests, givenQuickSleepRequestWhenItsSporadicWaitOptimizationIsDisabledThenDontOverrideQuickSleepRequest) { - overrideKmdNotifyParams(true, 3, true, 2, false, 0); + overrideKmdNotifyParams(true, 3, true, 2, false, 0, false, 0); auto csr = createMockCsr(); auto expectedDelay = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds; @@ -259,7 +262,7 @@ HWTEST_F(KmdNotifyTests, givenTaskCountLowerThanHwTagWhenWaitCalledThenDontMulti } HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWhenWaitCalledThenUpdateWaitTimestamp) { - overrideKmdNotifyParams(true, 3, true, 2, true, 1); + overrideKmdNotifyParams(true, 3, true, 2, true, 1, false, 0); auto csr = createMockCsr(); EXPECT_NE(0, mockKmdNotifyHelper->lastWaitForCompletionTimestampUs.load()); @@ -270,7 +273,7 @@ HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWhenWaitCalledThenUpda } HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWithDisabledSporadicWaitOptimizationWhenWaitCalledThenDontUpdateWaitTimestamp) { - overrideKmdNotifyParams(true, 3, true, 2, false, 0); + overrideKmdNotifyParams(true, 3, true, 2, false, 0, false, 0); auto csr = createMockCsr(); EXPECT_EQ(0, mockKmdNotifyHelper->lastWaitForCompletionTimestampUs.load()); @@ -298,7 +301,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffLowerThanMinimumToCheckAcLineWhenObtain EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine); int64_t timeout = 0; - helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true); + helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true, false); EXPECT_EQ(0u, helper.updateAcLineStatusCalled); } @@ -313,7 +316,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffGreaterThanMinimumToCheckAcLineAndDisab EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine); int64_t timeout = 0; - helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true); + helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true, false); EXPECT_EQ(1u, helper.updateAcLineStatusCalled); } @@ -322,7 +325,7 @@ TEST_F(KmdNotifyTests, givenKmdWaitModeNotActiveWhenObtainTimeoutParamsThenFalse MockKmdNotifyHelper helper(&(hwInfo->capabilityTable.kmdNotifyProperties)); int64_t timeout = 0; - auto enableTimeout = helper.obtainTimeoutParams(timeout, false, 1, 1, 1, false, false); + auto enableTimeout = helper.obtainTimeoutParams(timeout, false, 1, 1, 1, false, false, false); EXPECT_FALSE(enableTimeout); EXPECT_FALSE(timeout); @@ -338,7 +341,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffGreaterThanMinimumToCheckAcLineAndEnabl EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine); int64_t timeout = 0; - helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true); + helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true, false); EXPECT_EQ(0u, helper.updateAcLineStatusCalled); } @@ -349,7 +352,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenAcLineIsDisconnectedTh helper.acLineConnected = false; int64_t timeout = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false, true); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false, true, false); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(KmdNotifyConstants::timeoutInMicrosecondsForDisconnectedAcLine, timeout); @@ -363,7 +366,7 @@ TEST_F(KmdNotifyTests, givenEnabledKmdNotifyMechanismWhenAcLineIsDisconnectedThe helper.acLineConnected = false; int64_t timeout = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false, true); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false, true, false); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(hwInfo->capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds, timeout); @@ -376,7 +379,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismAndFlushStampIsZeroWhenAcL int64_t timeout = 0; FlushStamp flushStampToWait = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, false); EXPECT_FALSE(timeoutEnabled); } @@ -390,7 +393,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenPowerSavingModeIsSetTh int64_t timeout = 0; FlushStamp flushStampToWait = 1; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, false); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(1, timeout); } @@ -401,7 +404,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenPowerSavingModeIsReque int64_t timeout = 0; FlushStamp flushStampToWait = 1; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, true, true); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, true, true, false); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(1, timeout); } @@ -415,7 +418,49 @@ TEST_F(KmdNotifyTests, givenEnabledKmdNotifyMechanismWhenPowerSavingModeIsSetAnd int64_t timeout = 0; FlushStamp flushStampToWait = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, false); EXPECT_FALSE(timeoutEnabled); EXPECT_EQ(0, timeout); } + +TEST_F(KmdNotifyTests, givenEnabledKmdDirectSubmissionNotifyMechanismWhenDirectSubmissionIsEnabledThenSelectDelayTimeoutForDirectSubmission) { + overrideKmdNotifyParams(true, 150, false, 0, false, 0, true, 20); + + MockKmdNotifyHelper helper(&(hwInfo->capabilityTable.kmdNotifyProperties)); + + constexpr int64_t expectedTimeout = 20; + constexpr bool directSubmission = true; + int64_t timeout = 0; + FlushStamp flushStampToWait = 1; + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, directSubmission); + EXPECT_TRUE(timeoutEnabled); + EXPECT_EQ(expectedTimeout, timeout); +} + +TEST_F(KmdNotifyTests, givenEnabledKmdDirectSubmissionNotifyMechanismWhenDirectSubmissionIsDisabledThenSelectBaseDelayTimeout) { + overrideKmdNotifyParams(true, 150, false, 0, false, 0, true, 20); + + MockKmdNotifyHelper helper(&(hwInfo->capabilityTable.kmdNotifyProperties)); + + constexpr int64_t expectedTimeout = 150; + constexpr bool directSubmission = false; + int64_t timeout = 0; + FlushStamp flushStampToWait = 1; + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, directSubmission); + EXPECT_TRUE(timeoutEnabled); + EXPECT_EQ(expectedTimeout, timeout); +} + +TEST_F(KmdNotifyTests, givenDisabledKmdDirectSubmissionNotifyMechanismWhenDirectSubmissionIsEnabledThenSelectBaseDelayTimeout) { + overrideKmdNotifyParams(true, 150, false, 0, false, 0, false, 20); + + MockKmdNotifyHelper helper(&(hwInfo->capabilityTable.kmdNotifyProperties)); + + constexpr int64_t expectedTimeout = 150; + constexpr bool directSubmission = true; + int64_t timeout = 0; + FlushStamp flushStampToWait = 1; + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, directSubmission); + EXPECT_TRUE(timeoutEnabled); + EXPECT_EQ(expectedTimeout, timeout); +} diff --git a/opencl/test/unit_test/os_interface/device_factory_tests.cpp b/opencl/test/unit_test/os_interface/device_factory_tests.cpp index 218c774260..b6515f1b1a 100644 --- a/opencl/test/unit_test/os_interface/device_factory_tests.cpp +++ b/opencl/test/unit_test/os_interface/device_factory_tests.cpp @@ -68,6 +68,8 @@ TEST_F(DeviceFactoryTest, WhenOverridingUsingDebugManagerThenOverridesAreApplied auto refDelayQuickKmdSleepMicroseconds = hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds; auto refEnableQuickKmdSleepForSporadicWaits = hwInfo->capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits; auto refDelayQuickKmdSleepForSporadicWaitsMicroseconds = hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds; + auto refEnableQuickKmdSleepForDirectSubmission = hwInfo->capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission; + auto refDelayQuickKmdSleepForDirectSubmissionMicroseconds = hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds; DebugManager.flags.OverrideEnableKmdNotify.set(!refEnableKmdNotify); DebugManager.flags.OverrideKmdNotifyDelayMicroseconds.set(static_cast(refDelayKmdNotifyMicroseconds) + 10); @@ -78,6 +80,9 @@ TEST_F(DeviceFactoryTest, WhenOverridingUsingDebugManagerThenOverridesAreApplied DebugManager.flags.OverrideEnableQuickKmdSleepForSporadicWaits.set(!refEnableQuickKmdSleepForSporadicWaits); DebugManager.flags.OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds.set(static_cast(refDelayQuickKmdSleepForSporadicWaitsMicroseconds) + 12); + DebugManager.flags.OverrideEnableQuickKmdSleepForDirectSubmission.set(!refEnableQuickKmdSleepForDirectSubmission); + DebugManager.flags.OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds.set(static_cast(refDelayQuickKmdSleepForDirectSubmissionMicroseconds) + 15); + platformsImpl->clear(); executionEnvironment = constructPlatform()->peekExecutionEnvironment(); success = DeviceFactory::prepareDeviceEnvironments(*executionEnvironment); @@ -94,6 +99,11 @@ TEST_F(DeviceFactoryTest, WhenOverridingUsingDebugManagerThenOverridesAreApplied hwInfo->capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); EXPECT_EQ(refDelayQuickKmdSleepForSporadicWaitsMicroseconds + 12, hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + + EXPECT_EQ(!refEnableQuickKmdSleepForDirectSubmission, + hwInfo->capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + EXPECT_EQ(refDelayQuickKmdSleepForDirectSubmissionMicroseconds + 15, + hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); } TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetWhenCreateDevicesThenProperNumberOfDevicesIsReturned) { diff --git a/opencl/test/unit_test/test_files/igdrcl.config b/opencl/test/unit_test/test_files/igdrcl.config index ea53728699..152bf57b61 100644 --- a/opencl/test/unit_test/test_files/igdrcl.config +++ b/opencl/test/unit_test/test_files/igdrcl.config @@ -156,6 +156,8 @@ OverrideEnableQuickKmdSleep = -1 OverrideQuickKmdSleepDelayMicroseconds = -1 OverrideEnableQuickKmdSleepForSporadicWaits = -1 OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds = -1 +OverrideEnableQuickKmdSleepForDirectSubmission = -1 +OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds = -1 PowerSavingMode = 0 CsrDispatchMode = 0 OverrideDefaultFP64Settings = -1 diff --git a/shared/source/command_stream/command_stream_receiver_hw_base.inl b/shared/source/command_stream/command_stream_receiver_hw_base.inl index 6ffc7850e5..564cdb0745 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -855,7 +855,8 @@ inline void CommandStreamReceiverHw::waitForTaskCountWithKmdNotifyFal int64_t waitTimeout = 0; bool enableTimeout = false; - enableTimeout = kmdNotifyHelper->obtainTimeoutParams(waitTimeout, useQuickKmdSleep, *getTagAddress(), taskCountToWait, flushStampToWait, forcePowerSavingMode, this->isKmdWaitModeActive()); + enableTimeout = kmdNotifyHelper->obtainTimeoutParams(waitTimeout, useQuickKmdSleep, *getTagAddress(), taskCountToWait, flushStampToWait, forcePowerSavingMode, this->isKmdWaitModeActive(), + this->isAnyDirectSubmissionEnabled()); PRINT_DEBUG_STRING(DebugManager.flags.LogWaitingForCompletion.get(), stdout, "\nWaiting for task count %u at location %p. Current value: %u\n", diff --git a/shared/source/debug_settings/debug_variables_base.inl b/shared/source/debug_settings/debug_variables_base.inl index eb656a0f82..47ac94ae48 100644 --- a/shared/source/debug_settings/debug_variables_base.inl +++ b/shared/source/debug_settings/debug_variables_base.inl @@ -314,6 +314,8 @@ DECLARE_DEBUG_VARIABLE(int32_t, OverrideEnableQuickKmdSleep, -1, "-1: dont overr DECLARE_DEBUG_VARIABLE(int32_t, OverrideQuickKmdSleepDelayMicroseconds, -1, "-1: dont override, 0: infinite timeout, >0: timeout in microseconds") DECLARE_DEBUG_VARIABLE(int32_t, OverrideEnableQuickKmdSleepForSporadicWaits, -1, "-1: dont override, 0: disable, 1: enable. It works only when QuickKmdSleep is enabled.") DECLARE_DEBUG_VARIABLE(int32_t, OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds, -1, "-1: dont override, >0: timeout in microseconds") +DECLARE_DEBUG_VARIABLE(int32_t, OverrideEnableQuickKmdSleepForDirectSubmission, -1, "-1: dont override, 0: disable, 1: enable. It works only when QuickKmdSleep is enabled.") +DECLARE_DEBUG_VARIABLE(int32_t, OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds, -1, "-1: dont override, >0: timeout in microseconds") DECLARE_DEBUG_VARIABLE(int32_t, PowerSavingMode, 0, "0: default 1: enable. Whenever driver waits on GPU and its not ready, put waiting thread to sleep and wait for notification.") DECLARE_DEBUG_VARIABLE(int32_t, CsrDispatchMode, 0, "Chooses DispatchMode for Csr") DECLARE_DEBUG_VARIABLE(int32_t, RenderCompressedImagesEnabled, -1, "-1: default, 0: disabled, 1: enabled") diff --git a/shared/source/gen11/hw_info_ehl.cpp b/shared/source/gen11/hw_info_ehl.cpp index 37d7ebf315..fde79fe349 100644 --- a/shared/source/gen11/hw_info_ehl.cpp +++ b/shared/source/gen11/hw_info_ehl.cpp @@ -37,12 +37,14 @@ const PLATFORM EHL::platform = { const RuntimeCapabilityTable EHL::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max36BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationEHL, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -65,8 +67,6 @@ const RuntimeCapabilityTable EHL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen11/hw_info_icllp.cpp b/shared/source/gen11/hw_info_icllp.cpp index 17359bdfac..9a3d972e17 100644 --- a/shared/source/gen11/hw_info_icllp.cpp +++ b/shared/source/gen11/hw_info_icllp.cpp @@ -38,12 +38,14 @@ const PLATFORM ICLLP::platform = { const RuntimeCapabilityTable ICLLP::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationICLLP, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -66,8 +68,6 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen11/hw_info_lkf.cpp b/shared/source/gen11/hw_info_lkf.cpp index 9a9ad74369..4289d2ee9e 100644 --- a/shared/source/gen11/hw_info_lkf.cpp +++ b/shared/source/gen11/hw_info_lkf.cpp @@ -37,12 +37,14 @@ const PLATFORM LKF::platform = { const RuntimeCapabilityTable LKF::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max36BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationLKF, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -65,8 +67,6 @@ const RuntimeCapabilityTable LKF::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen12lp/hw_info_adlp.cpp b/shared/source/gen12lp/hw_info_adlp.cpp index 68816f9688..3667d158b0 100644 --- a/shared/source/gen12lp/hw_info_adlp.cpp +++ b/shared/source/gen12lp/hw_info_adlp.cpp @@ -35,12 +35,14 @@ const RuntimeCapabilityTable ADLP::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}, {aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max64BitAppAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationADLP, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -63,8 +65,6 @@ const RuntimeCapabilityTable ADLP::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen12lp/hw_info_adls.cpp b/shared/source/gen12lp/hw_info_adls.cpp index bc70a23340..101eadba52 100644 --- a/shared/source/gen12lp/hw_info_adls.cpp +++ b/shared/source/gen12lp/hw_info_adls.cpp @@ -35,12 +35,14 @@ const RuntimeCapabilityTable ADLS::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}, {aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max64BitAppAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationADLS, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -63,8 +65,6 @@ const RuntimeCapabilityTable ADLS::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen12lp/hw_info_dg1.cpp b/shared/source/gen12lp/hw_info_dg1.cpp index 5297335299..802b7b87ce 100644 --- a/shared/source/gen12lp/hw_info_dg1.cpp +++ b/shared/source/gen12lp/hw_info_dg1.cpp @@ -43,12 +43,14 @@ const RuntimeCapabilityTable DG1::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}, {aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max64BitAppAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationDG1, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -71,8 +73,6 @@ const RuntimeCapabilityTable DG1::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker diff --git a/shared/source/gen12lp/hw_info_rkl.cpp b/shared/source/gen12lp/hw_info_rkl.cpp index 7e5655f4b4..2851c85a90 100644 --- a/shared/source/gen12lp/hw_info_rkl.cpp +++ b/shared/source/gen12lp/hw_info_rkl.cpp @@ -35,12 +35,14 @@ const RuntimeCapabilityTable RKL::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}, {aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationRKL, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -63,8 +65,6 @@ const RuntimeCapabilityTable RKL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen12lp/hw_info_tgllp.cpp b/shared/source/gen12lp/hw_info_tgllp.cpp index c6e815daf8..7771670fa3 100644 --- a/shared/source/gen12lp/hw_info_tgllp.cpp +++ b/shared/source/gen12lp/hw_info_tgllp.cpp @@ -39,12 +39,14 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}, {aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max64BitAppAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationTGLLP, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -67,8 +69,6 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{ false, // ftrRenderCompressedImages true, // instrumentationEnabled true, // ftr64KBpages - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen8/hw_info_bdw.cpp b/shared/source/gen8/hw_info_bdw.cpp index f1fa8e5f9b..4156328bda 100644 --- a/shared/source/gen8/hw_info_bdw.cpp +++ b/shared/source/gen8/hw_info_bdw.cpp @@ -41,51 +41,51 @@ const PLATFORM BDW::platform = { const RuntimeCapabilityTable BDW::capabilityTable{ EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {50000, 5000, 200000, true, true, true}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 80, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - &isSimulationBDW, // isSimulation - PreemptionMode::Disabled, // defaultPreemptionMode - aub_stream::ENGINE_RCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Bdw, // aubDeviceId - 0, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(BDW::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - true, // ftrSupportsInteger64BitAtomics - true, // ftrSupportsFP64 - true, // ftrSupports64BitMath - true, // ftrSvm - true, // ftrSupportsCoherency - false, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - false, // ftr64KBpages - true, // instrumentationEnabled - "core", // platformType - "", // deviceName - false, // sourceLevelDebuggerSupported - false, // supportsVme - false, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - true, // supportsPipes - true, // supportsOcl21Features - false, // supportsOnDemandPageFaults - true, // supportsIndependentForwardProgress - true, // hostPtrTrackingEnabled - false, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false // fusedEuEnabled + {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines + {50000, 5000, 200000, 0, true, true, true, false}, // kmdNotifyProperties + MemoryConstants::max48BitAddress, // gpuAddressSpace + 0, // sharedSystemMemCapabilities + 80, // defaultProfilingTimerResolution + MemoryConstants::pageSize, // requiredPreemptionSurfaceSize + &isSimulationBDW, // isSimulation + "core", // platformType + "", // deviceName + PreemptionMode::Disabled, // defaultPreemptionMode + aub_stream::ENGINE_RCS, // defaultEngineType + 0, // maxRenderFrequency + 30, // clVersionSupport + CmdServicesMemTraceVersion::DeviceValues::Bdw, // aubDeviceId + 0, // extraQuantityThreadsPerEU + 64, // slmSize + sizeof(BDW::GRF), // grfSize + 36u, // timestampValidBits + 32u, // kernelTimestampValidBits + false, // blitterOperationsSupported + true, // ftrSupportsInteger64BitAtomics + true, // ftrSupportsFP64 + true, // ftrSupports64BitMath + true, // ftrSvm + true, // ftrSupportsCoherency + false, // ftrSupportsVmeAvcTextureSampler + false, // ftrSupportsVmeAvcPreemption + false, // ftrRenderCompressedBuffers + false, // ftrRenderCompressedImages + false, // ftr64KBpages + true, // instrumentationEnabled + false, // sourceLevelDebuggerSupported + false, // supportsVme + false, // supportCacheFlushAfterWalker + true, // supportsImages + false, // supportsDeviceEnqueue + true, // supportsPipes + true, // supportsOcl21Features + false, // supportsOnDemandPageFaults + true, // supportsIndependentForwardProgress + true, // hostPtrTrackingEnabled + false, // levelZeroSupported + true, // isIntegratedDevice + true, // supportsMediaBlock + false // fusedEuEnabled }; WorkaroundTable BDW::workaroundTable = {}; diff --git a/shared/source/gen9/hw_info_bxt.cpp b/shared/source/gen9/hw_info_bxt.cpp index 7af2f32c2c..7eeca10230 100644 --- a/shared/source/gen9/hw_info_bxt.cpp +++ b/shared/source/gen9/hw_info_bxt.cpp @@ -39,12 +39,14 @@ const PLATFORM BXT::platform = { const RuntimeCapabilityTable BXT::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 52.083, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationBXT, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -67,8 +69,6 @@ const RuntimeCapabilityTable BXT::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen9/hw_info_cfl.cpp b/shared/source/gen9/hw_info_cfl.cpp index 2f9af65461..ece52da1b1 100644 --- a/shared/source/gen9/hw_info_cfl.cpp +++ b/shared/source/gen9/hw_info_cfl.cpp @@ -34,12 +34,14 @@ const PLATFORM CFL::platform = { const RuntimeCapabilityTable CFL::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationCFL, // isSimulation + "core", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -62,8 +64,6 @@ const RuntimeCapabilityTable CFL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "core", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen9/hw_info_glk.cpp b/shared/source/gen9/hw_info_glk.cpp index 2bc8d0b0a2..805db729fd 100644 --- a/shared/source/gen9/hw_info_glk.cpp +++ b/shared/source/gen9/hw_info_glk.cpp @@ -34,12 +34,14 @@ const PLATFORM GLK::platform = { const RuntimeCapabilityTable GLK::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {30000, 0, 0, true, false, false}, // kmdNotifyProperties + {30000, 0, 0, 0, true, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 52.083, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationGLK, // isSimulation + "lp", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -62,8 +64,6 @@ const RuntimeCapabilityTable GLK::capabilityTable{ false, // ftrRenderCompressedImages false, // ftr64KBpages true, // instrumentationEnabled - "lp", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen9/hw_info_kbl.cpp b/shared/source/gen9/hw_info_kbl.cpp index 2bcbbe5721..9cb0441bbe 100644 --- a/shared/source/gen9/hw_info_kbl.cpp +++ b/shared/source/gen9/hw_info_kbl.cpp @@ -34,12 +34,14 @@ const PLATFORM KBL::platform = { const RuntimeCapabilityTable KBL::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationKBL, // isSimulation + "core", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -62,8 +64,6 @@ const RuntimeCapabilityTable KBL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "core", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/gen9/hw_info_skl.cpp b/shared/source/gen9/hw_info_skl.cpp index 897154b5e8..a48247472a 100644 --- a/shared/source/gen9/hw_info_skl.cpp +++ b/shared/source/gen9/hw_info_skl.cpp @@ -42,12 +42,14 @@ const PLATFORM SKL::platform = { const RuntimeCapabilityTable SKL::capabilityTable{ EngineDirectSubmissionInitVec{ {aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationSKL, // isSimulation + "core", // platformType + "", // deviceName PreemptionMode::MidThread, // defaultPreemptionMode aub_stream::ENGINE_RCS, // defaultEngineType 0, // maxRenderFrequency @@ -70,8 +72,6 @@ const RuntimeCapabilityTable SKL::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "core", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported true, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/helpers/hw_info.h b/shared/source/helpers/hw_info.h index cc4c867501..1fb80f3ff0 100644 --- a/shared/source/helpers/hw_info.h +++ b/shared/source/helpers/hw_info.h @@ -28,6 +28,8 @@ struct RuntimeCapabilityTable { double defaultProfilingTimerResolution; size_t requiredPreemptionSurfaceSize; bool (*isSimulation)(unsigned short); + const char *platformType; + const char *deviceName; PreemptionMode defaultPreemptionMode; aub_stream::EngineType defaultEngineType; uint32_t maxRenderFrequency; @@ -50,8 +52,6 @@ struct RuntimeCapabilityTable { bool ftrRenderCompressedImages; bool ftr64KBpages; bool instrumentationEnabled; - const char *platformType; - const char *deviceName; bool debuggerSupported; bool supportsVme; bool supportCacheFlushAfterWalker; @@ -83,6 +83,8 @@ inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilit result &= (lhs.kmdNotifyProperties.delayKmdNotifyMicroseconds == rhs.kmdNotifyProperties.delayKmdNotifyMicroseconds); result &= (lhs.kmdNotifyProperties.delayQuickKmdSleepMicroseconds == rhs.kmdNotifyProperties.delayQuickKmdSleepMicroseconds); result &= (lhs.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds == rhs.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + result &= (lhs.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission == rhs.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + result &= (lhs.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds == rhs.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); result &= (lhs.kmdNotifyProperties.enableKmdNotify == rhs.kmdNotifyProperties.enableKmdNotify); result &= (lhs.kmdNotifyProperties.enableQuickKmdSleep == rhs.kmdNotifyProperties.enableQuickKmdSleep); result &= (lhs.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits == rhs.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); diff --git a/shared/source/helpers/kmd_notify_properties.cpp b/shared/source/helpers/kmd_notify_properties.cpp index 373c70777f..b3268c3d65 100644 --- a/shared/source/helpers/kmd_notify_properties.cpp +++ b/shared/source/helpers/kmd_notify_properties.cpp @@ -19,7 +19,8 @@ bool KmdNotifyHelper::obtainTimeoutParams(int64_t &timeoutValueOutput, uint32_t taskCountToWait, FlushStamp flushStampToWait, bool forcePowerSavingMode, - bool kmdWaitModeActive) { + bool kmdWaitModeActive, + bool directSubmissionEnabled) { if (flushStampToWait == 0) { return false; } @@ -44,6 +45,8 @@ bool KmdNotifyHelper::obtainTimeoutParams(int64_t &timeoutValueOutput, timeoutValueOutput = KmdNotifyConstants::timeoutInMicrosecondsForDisconnectedAcLine; } else if (quickKmdSleepRequest && properties->enableQuickKmdSleep) { timeoutValueOutput = properties->delayQuickKmdSleepMicroseconds; + } else if (directSubmissionEnabled && properties->enableQuickKmdSleepForDirectSubmission) { + timeoutValueOutput = properties->delayQuickKmdSleepForDirectSubmissionMicroseconds; } else { timeoutValueOutput = getBaseTimeout(multiplier); } diff --git a/shared/source/helpers/kmd_notify_properties.h b/shared/source/helpers/kmd_notify_properties.h index 7e8c55a09d..277bab3cc0 100644 --- a/shared/source/helpers/kmd_notify_properties.h +++ b/shared/source/helpers/kmd_notify_properties.h @@ -17,12 +17,15 @@ struct KmdNotifyProperties { int64_t delayKmdNotifyMicroseconds; int64_t delayQuickKmdSleepMicroseconds; int64_t delayQuickKmdSleepForSporadicWaitsMicroseconds; + int64_t delayQuickKmdSleepForDirectSubmissionMicroseconds; // Main switch for KMD Notify optimization - if its disabled, all below are disabled too bool enableKmdNotify; // Use smaller delay in specific situations (ie. from AsyncEventsHandler) bool enableQuickKmdSleep; // If waits are called sporadically use QuickKmdSleep mode, otherwise use standard delay bool enableQuickKmdSleepForSporadicWaits; + // If direct submission is enabled, use direct submission delay, otherwise use standard delay + bool enableQuickKmdSleepForDirectSubmission; }; namespace KmdNotifyConstants { @@ -42,7 +45,8 @@ class KmdNotifyHelper { uint32_t taskCountToWait, FlushStamp flushStampToWait, bool forcePowerSavingMode, - bool kmdWaitModeActive); + bool kmdWaitModeActive, + bool directSubmissionEnabled); bool quickKmdSleepForSporadicWaitsEnabled() const { return properties->enableQuickKmdSleepForSporadicWaits; } MOCKABLE_VIRTUAL void updateLastWaitForCompletionTimestamp(); diff --git a/shared/source/os_interface/linux/hw_info_config_drm.cpp b/shared/source/os_interface/linux/hw_info_config_drm.cpp index 6e9efaafb3..da1877b8a3 100644 --- a/shared/source/os_interface/linux/hw_info_config_drm.cpp +++ b/shared/source/os_interface/linux/hw_info_config_drm.cpp @@ -196,6 +196,8 @@ int HwInfoConfig::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideQuickKmdSleepDelayMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepMicroseconds); KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForSporadicWaits.get(), kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForDirectSubmission.get(), kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); return 0; } diff --git a/shared/source/os_interface/windows/hw_info_config_wddm.cpp b/shared/source/os_interface/windows/hw_info_config_wddm.cpp index 4684a7e952..fda62c276c 100644 --- a/shared/source/os_interface/windows/hw_info_config_wddm.cpp +++ b/shared/source/os_interface/windows/hw_info_config_wddm.cpp @@ -47,6 +47,8 @@ int HwInfoConfig::configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInfo KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideQuickKmdSleepDelayMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepMicroseconds); KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForSporadicWaits.get(), kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits); KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds); + KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForDirectSubmission.get(), kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission); + KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds); // Product specific config int ret = configureHardwareCustom(outHwInfo, osIface); diff --git a/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp b/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp index fbb9d828e2..244472da90 100644 --- a/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp +++ b/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp @@ -39,12 +39,14 @@ const RuntimeCapabilityTable XE_HP_SDV::capabilityTable{ {aub_stream::ENGINE_CCS1, {true, false, true, true}}, {aub_stream::ENGINE_CCS2, {true, false, true, true}}, {aub_stream::ENGINE_CCS3, {true, false, true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationXEHP, // isSimulation + "core", // platformType + "", // deviceName PreemptionMode::ThreadGroup, // defaultPreemptionMode aub_stream::ENGINE_CCS, // defaultEngineType 0, // maxRenderFrequency @@ -67,8 +69,6 @@ const RuntimeCapabilityTable XE_HP_SDV::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "core", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker diff --git a/shared/source/xe_hpc_core/hw_info_pvc.cpp b/shared/source/xe_hpc_core/hw_info_pvc.cpp index 0d210fac17..143f719070 100644 --- a/shared/source/xe_hpc_core/hw_info_pvc.cpp +++ b/shared/source/xe_hpc_core/hw_info_pvc.cpp @@ -47,12 +47,14 @@ const RuntimeCapabilityTable PVC::capabilityTable{ {aub_stream::ENGINE_BCS6, {true, false, true, true}}, {aub_stream::ENGINE_BCS7, {true, false, true, true}}, {aub_stream::ENGINE_BCS8, {true, false, true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties maxNBitValue(57), // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationPVC, // isSimulation + "core", // platformType + "", // deviceName PreemptionMode::ThreadGroup, // defaultPreemptionMode aub_stream::ENGINE_CCS, // defaultEngineType 0, // maxRenderFrequency @@ -75,8 +77,6 @@ const RuntimeCapabilityTable PVC::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "core", // platformType - "", // deviceName false, // sourceLevelDebuggerSupported false, // supportsVme false, // supportCacheFlushAfterWalker diff --git a/shared/source/xe_hpg_core/hw_info_dg2.cpp b/shared/source/xe_hpg_core/hw_info_dg2.cpp index 0c68781ee1..d161feed7c 100644 --- a/shared/source/xe_hpg_core/hw_info_dg2.cpp +++ b/shared/source/xe_hpg_core/hw_info_dg2.cpp @@ -39,12 +39,14 @@ const RuntimeCapabilityTable DG2::capabilityTable{ {aub_stream::ENGINE_CCS1, {true, false, true, true}}, {aub_stream::ENGINE_CCS2, {true, false, true, true}}, {aub_stream::ENGINE_CCS3, {true, false, true, true}}}, // directSubmissionEngines - {0, 0, 0, false, false, false}, // kmdNotifyProperties + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties MemoryConstants::max48BitAddress, // gpuAddressSpace 0, // sharedSystemMemCapabilities 83.333, // defaultProfilingTimerResolution MemoryConstants::pageSize, // requiredPreemptionSurfaceSize &isSimulationDG2, // isSimulation + "dg2", // platformType + "", // deviceName PreemptionMode::ThreadGroup, // defaultPreemptionMode aub_stream::ENGINE_CCS, // defaultEngineType 0, // maxRenderFrequency @@ -67,8 +69,6 @@ const RuntimeCapabilityTable DG2::capabilityTable{ false, // ftrRenderCompressedImages true, // ftr64KBpages true, // instrumentationEnabled - "dg2", // platformType - "", // deviceName true, // sourceLevelDebuggerSupported false, // supportsVme true, // supportCacheFlushAfterWalker