Disable wait timeout when flushStamp is 0
Change-Id: I416ace1f8c1a3e5aa91d9bc2425a4faa77e2fbe7
This commit is contained in:
parent
f997b45145
commit
c0d3eade30
|
@ -559,7 +559,9 @@ inline void CommandStreamReceiverHw<GfxFamily>::emitNoop(LinearStream &commandSt
|
|||
|
||||
template <typename GfxFamily>
|
||||
inline void CommandStreamReceiverHw<GfxFamily>::waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait) {
|
||||
auto status = waitForCompletionWithTimeout(this->hwInfo.capabilityTable.enableKmdNotify, this->hwInfo.capabilityTable.delayKmdNotifyMicroseconds, taskCountToWait);
|
||||
auto status = waitForCompletionWithTimeout(this->hwInfo.capabilityTable.enableKmdNotify && flushStampToWait != 0,
|
||||
this->hwInfo.capabilityTable.delayKmdNotifyMicroseconds,
|
||||
taskCountToWait);
|
||||
if (!status) {
|
||||
waitForFlushStamp(flushStampToWait);
|
||||
//now call blocking wait, this is to ensure that task count is reached
|
||||
|
|
|
@ -762,6 +762,17 @@ HWTEST_F(KmdNotifyTests, givenMultipleCommandQueuesWhenMarkerIsEmittedThenGraphi
|
|||
EXPECT_EQ(commandStreamGraphicsAllocation, commandStreamGraphicsAllocation2);
|
||||
}
|
||||
|
||||
HWTEST_F(KmdNotifyTests, givenZeroFlushStampWhenWaitIsCalledThenDisableTimeout) {
|
||||
auto csr = new ::testing::NiceMock<MyCsr<FamilyType>>(device->getHardwareInfo());
|
||||
device->resetCommandStreamReceiver(csr);
|
||||
|
||||
EXPECT_TRUE(device->getHardwareInfo().capabilityTable.enableKmdNotify);
|
||||
EXPECT_CALL(*csr, waitForCompletionWithTimeout(false, ::testing::_, taskCountToWait)).Times(1).WillOnce(::testing::Return(true));
|
||||
EXPECT_CALL(*csr, waitForFlushStamp(::testing::_)).Times(0);
|
||||
|
||||
csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 0);
|
||||
}
|
||||
|
||||
constexpr char sipPattern[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 39, 41};
|
||||
static_assert(false == isAligned<MemoryConstants::cacheLineSize>(sizeof(sipPattern)),
|
||||
"Will be checking for automatic cacheline alignment, so pattern length must not be a multiple of cacheline");
|
||||
|
|
Loading…
Reference in New Issue