Skip to content

Commit cff80e3

Browse files
Do not program MiFlushDw command as a timestamp operation for blitter
Resolves: NEO-4906 Signed-off-by: Igor Venevtsev <[email protected]>
1 parent e8178ae commit cff80e3

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

opencl/test/unit_test/helpers/timestamp_packet_tests.cpp

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ TEST_F(TimestampPacketTests, givenTagNodeWhatAskingForGpuAddressesThenReturnCorr
208208
EXPECT_EQ(expectedCounterAddress, TimestampPacketHelper::getGpuDependenciesCountGpuAddress(mockNode));
209209
}
210210

211-
TEST_F(TimestampPacketSimpleTests, whenContextEndTagIsNotOneThenMarkAsCompleted) {
211+
TEST_F(TimestampPacketSimpleTests, whenEndTagIsNotOneThenMarkAsCompleted) {
212212
TimestampPacketStorage timestampPacketStorage;
213213
auto &packet = timestampPacketStorage.packets[0];
214214
timestampPacketStorage.initialize();
@@ -223,10 +223,10 @@ TEST_F(TimestampPacketSimpleTests, whenContextEndTagIsNotOneThenMarkAsCompleted)
223223

224224
packet.contextEnd = 0;
225225
packet.globalEnd = 1;
226-
EXPECT_TRUE(timestampPacketStorage.isCompleted());
226+
EXPECT_FALSE(timestampPacketStorage.isCompleted());
227227

228-
packet.contextEnd = 100;
229-
packet.globalEnd = 100;
228+
packet.contextEnd = 0;
229+
packet.globalEnd = 0;
230230
EXPECT_TRUE(timestampPacketStorage.isCompleted());
231231
}
232232

@@ -272,13 +272,9 @@ TEST_F(TimestampPacketSimpleTests, whenIsCompletedIsCalledThenItReturnsProperTim
272272

273273
EXPECT_FALSE(timestampPacketStorage.isCompleted());
274274
packet.contextEnd = 0;
275-
EXPECT_TRUE(timestampPacketStorage.isCompleted());
276-
packet.contextEnd = 100;
277-
EXPECT_TRUE(timestampPacketStorage.isCompleted());
275+
EXPECT_FALSE(timestampPacketStorage.isCompleted());
278276
packet.globalEnd = 0;
279277
EXPECT_TRUE(timestampPacketStorage.isCompleted());
280-
packet.globalEnd = 100;
281-
EXPECT_TRUE(timestampPacketStorage.isCompleted());
282278
}
283279

284280
TEST_F(TimestampPacketSimpleTests, givenMultiplePacketsInUseWhenCompletionIsCheckedTheVerifyAllUsedNodes) {
@@ -295,16 +291,10 @@ TEST_F(TimestampPacketSimpleTests, givenMultiplePacketsInUseWhenCompletionIsChec
295291
}
296292

297293
packets[timestampPacketStorage.packetsUsed - 1].contextEnd = 0;
298-
EXPECT_TRUE(timestampPacketStorage.isCompleted());
299-
300-
packets[timestampPacketStorage.packetsUsed - 1].contextEnd = 100;
301-
EXPECT_TRUE(timestampPacketStorage.isCompleted());
294+
EXPECT_FALSE(timestampPacketStorage.isCompleted());
302295

303296
packets[timestampPacketStorage.packetsUsed - 1].globalEnd = 0;
304297
EXPECT_TRUE(timestampPacketStorage.isCompleted());
305-
306-
packets[timestampPacketStorage.packetsUsed - 1].globalEnd = 100;
307-
EXPECT_TRUE(timestampPacketStorage.isCompleted());
308298
}
309299

310300
TEST_F(TimestampPacketSimpleTests, whenNewTagIsTakenThenReinitialize) {

shared/source/command_stream/command_stream_receiver_hw_base.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ uint32_t CommandStreamReceiverHw<GfxFamily>::blitBuffer(const BlitPropertiesCont
984984
EncodeStoreMMIO<GfxFamily>::encode(commandStream, REG_GLOBAL_TIMESTAMP_LDW, timestampGlobalEndAddress);
985985
} else {
986986
auto timestampPacketGpuAddress = TimestampPacketHelper::getContextEndGpuAddress(*blitProperties.outputTimestampPacket);
987-
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(commandStream, timestampPacketGpuAddress, 0, true, true);
987+
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(commandStream, timestampPacketGpuAddress, 0, false, true);
988988
}
989989
makeResident(*blitProperties.outputTimestampPacket->getBaseGraphicsAllocation());
990990
}

shared/source/helpers/timestamp_packet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct TimestampPacketStorage {
4747
}
4848

4949
for (uint32_t i = 0; i < packetsUsed; i++) {
50-
if (packets[i].contextEnd == 1) {
50+
if ((packets[i].contextEnd == 1) || (packets[i].globalEnd == 1)) {
5151
return false;
5252
}
5353
}

0 commit comments

Comments
 (0)