From ce2d7ea67e29510ae8bc94bbe0c3e5a37c82713f Mon Sep 17 00:00:00 2001 From: Szymon Morek Date: Wed, 13 Aug 2025 10:45:29 +0000 Subject: [PATCH] fix: disable timestamp caching for platforms with dc flush Related-To: NEO-14360 Signed-off-by: Szymon Morek --- .../source/os_interface/product_helper_xe2_and_later.inl | 2 +- .../unit_test/helpers/gfx_core_helper_xe2_and_later.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/shared/source/os_interface/product_helper_xe2_and_later.inl b/shared/source/os_interface/product_helper_xe2_and_later.inl index 039fd7f4ec..08fb90fc2f 100644 --- a/shared/source/os_interface/product_helper_xe2_and_later.inl +++ b/shared/source/os_interface/product_helper_xe2_and_later.inl @@ -59,7 +59,7 @@ bool ProductHelperHw::isNonCoherentTimestampsModeEnabled() const { if (debugManager.flags.ForceNonCoherentModeForTimestamps.get() != -1) { return debugManager.flags.ForceNonCoherentModeForTimestamps.get(); } - return true; + return !this->isDcFlushAllowed(); } template diff --git a/shared/test/unit_test/helpers/gfx_core_helper_xe2_and_later.cpp b/shared/test/unit_test/helpers/gfx_core_helper_xe2_and_later.cpp index ceb7bd5815..949c1fc1c7 100644 --- a/shared/test/unit_test/helpers/gfx_core_helper_xe2_and_later.cpp +++ b/shared/test/unit_test/helpers/gfx_core_helper_xe2_and_later.cpp @@ -25,6 +25,13 @@ HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenAtLeastXe2HpgWhenCallIsTimestampSh EXPECT_FALSE(gfxCoreHelper.isTimestampShiftRequired()); } +HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenAtLeastXe2HpgWhenCallIsNonCoherentTimestampsModeEnabledThenReturnCorrectValue, IsAtLeastXe2HpgCore) { + MockExecutionEnvironment mockExecutionEnvironment{}; + + auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHelper(); + EXPECT_EQ(!productHelper.isDcFlushAllowed(), productHelper.isNonCoherentTimestampsModeEnabled()); +} + HWTEST2_F(GfxCoreHelperXe2AndLaterTests, givenDebugFlagWhenCheckingIsResolveDependenciesByPipeControlsSupportedThenCorrectValueIsReturned, IsLNL) { DebugManagerStateRestore restorer;