From e363c871c763c158731733352bdf79ab620f2de4 Mon Sep 17 00:00:00 2001 From: Bartosz Dunajski Date: Fri, 15 Nov 2024 11:58:51 +0000 Subject: [PATCH] fix: skip signaling remaining packets only for explicit CB Events Related-To: HSD-18040605969 Signed-off-by: Bartosz Dunajski --- level_zero/core/source/cmdlist/cmdlist_hw.inl | 2 +- .../sources/cmdlist/test_in_order_cmdlist_1.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 526d44ba99..6f1392d15b 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -3913,7 +3913,7 @@ void CommandListCoreFamily::dispatchEventPostSyncOperation(Event template void CommandListCoreFamily::dispatchEventRemainingPacketsPostSyncOperation(Event *event, bool copyOperation) { - if (this->signalAllEventPackets && !event->isCounterBased() && event->getPacketsInUse() < event->getMaxPacketsCount()) { + if (this->signalAllEventPackets && !event->isCounterBasedExplicitlyEnabled() && event->getPacketsInUse() < event->getMaxPacketsCount()) { uint32_t packets = event->getMaxPacketsCount() - event->getPacketsInUse(); CmdListEventOperation remainingPacketsOperation = estimateEventPostSync(event, packets); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_1.cpp index 561145188e..c91a0b4db2 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist_1.cpp @@ -2808,6 +2808,15 @@ HWTEST2_F(InOrderCmdListTests, givenSignalAllPacketsSetWhenProgrammingRemainingP immCmdList->dispatchEventRemainingPacketsPostSyncOperation(events[0].get(), true); EXPECT_EQ(offset, cmdStream->getUsed()); + + events[0]->makeCounterBasedInitiallyDisabled(eventPool->getAllocation()); + + offset = cmdStream->getUsed(); + + immCmdList->dispatchEventRemainingPacketsPostSyncOperation(events[0].get(), false); + immCmdList->dispatchEventRemainingPacketsPostSyncOperation(events[0].get(), true); + + EXPECT_NE(offset, cmdStream->getUsed()); } HWTEST2_F(InOrderCmdListTests, givenInOrderModeWhenProgrammingWalkerThenProgramPipeControlWithSignalAllocation, IsGen12LP) {