KMD Notfy: Multiply timeout by taskCount diff only on Linux

Change-Id: Idb75dcc02cd218ff097f29d6881c97bb8feb25da
This commit is contained in:
Dunajski, Bartosz
2018-04-19 19:08:10 +02:00
committed by sys_ocldev
parent 6eec23844b
commit 5ed13d7c88
8 changed files with 80 additions and 23 deletions

View File

@@ -221,25 +221,6 @@ HWTEST_F(KmdNotifyTests, givenQuickSleepRequestWhenItsSporadicWaitOptimizationIs
csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, true);
}
HWTEST_F(KmdNotifyTests, givenComputeTimeoutMultiplierWhenWaitCalledThenUseNewTimeout) {
auto csr = createMockCsr<FamilyType>();
*device->getTagAddress() = taskCountToWait;
taskCountToWait += 5;
auto expectedTimeout = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds *
(taskCountToWait - *device->getTagAddress());
auto updateHwTag = [&](bool, int64_t, uint32_t) {
*device->getTagAddress() = taskCountToWait;
return true;
};
EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, expectedTimeout, ::testing::_)).Times(1).WillOnce(::testing::Invoke(updateHwTag));
csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false);
}
HWTEST_F(KmdNotifyTests, givenTaskCountEqualToHwTagWhenWaitCalledThenDontMultiplyTimeout) {
auto csr = createMockCsr<FamilyType>();
*device->getTagAddress() = taskCountToWait;