diff --git a/runtime/command_queue/command_queue.cpp b/runtime/command_queue/command_queue.cpp index 02cac60d63..b18ba8d91d 100644 --- a/runtime/command_queue/command_queue.cpp +++ b/runtime/command_queue/command_queue.cpp @@ -133,7 +133,9 @@ void CommandQueue::waitUntilComplete(uint32_t taskCountToWait, FlushStamp flushS DBG_LOG(LogTaskCounts, __FUNCTION__, "Waiting for taskCount:", taskCountToWait); DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "Current taskCount:", getHwTag()); - device->getCommandStreamReceiver().waitForTaskCountWithKmdNotifyFallback(taskCountToWait, flushStampToWait, useQuickKmdSleep, *device->getOsContext()); + bool forcePowerSavingMode = this->throttle == QueueThrottle::LOW; + + device->getCommandStreamReceiver().waitForTaskCountWithKmdNotifyFallback(taskCountToWait, flushStampToWait, useQuickKmdSleep, *device->getOsContext(), forcePowerSavingMode); DEBUG_BREAK_IF(getHwTag() < taskCountToWait); latestTaskCountWaited = taskCountToWait; diff --git a/runtime/command_stream/command_stream_receiver.h b/runtime/command_stream/command_stream_receiver.h index 2412cd0b8a..685eaa7279 100644 --- a/runtime/command_stream/command_stream_receiver.h +++ b/runtime/command_stream/command_stream_receiver.h @@ -119,7 +119,7 @@ class CommandStreamReceiver { void requestThreadArbitrationPolicy(uint32_t requiredPolicy) { this->requiredThreadArbitrationPolicy = requiredPolicy; } void requestStallingPipeControlOnNextFlush() { stallingPipeControlOnNextFlushRequired = true; } - virtual void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, OsContext &osContext) = 0; + virtual void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, OsContext &osContext, bool forcePowerSavingMode) = 0; MOCKABLE_VIRTUAL bool waitForCompletionWithTimeout(bool enableTimeout, int64_t timeoutMicroseconds, uint32_t taskCountToWait); void setSamplerCacheFlushRequired(SamplerCacheFlushState value) { this->samplerCacheFlushRequired = value; } diff --git a/runtime/command_stream/command_stream_receiver_hw.h b/runtime/command_stream/command_stream_receiver_hw.h index 646463a02c..1a4113b98f 100644 --- a/runtime/command_stream/command_stream_receiver_hw.h +++ b/runtime/command_stream/command_stream_receiver_hw.h @@ -54,7 +54,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { size_t getCmdSizeForMediaSampler(bool mediaSamplerRequired) const; void programComputeMode(LinearStream &csr, DispatchFlags &dispatchFlags); - void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, OsContext &osContext) override; + void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, OsContext &osContext, bool forcePowerSavingMode) override; const HardwareInfo &peekHwInfo() const { return hwInfo; } void collectStateBaseAddresPatchInfo( diff --git a/runtime/command_stream/command_stream_receiver_hw.inl b/runtime/command_stream/command_stream_receiver_hw.inl index b68dbc9c15..46ae4cf07b 100644 --- a/runtime/command_stream/command_stream_receiver_hw.inl +++ b/runtime/command_stream/command_stream_receiver_hw.inl @@ -685,9 +685,9 @@ inline void CommandStreamReceiverHw::emitNoop(LinearStream &commandSt } template -inline void CommandStreamReceiverHw::waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, OsContext &osContext) { +inline void CommandStreamReceiverHw::waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep, OsContext &osContext, bool forcePowerSavingMode) { int64_t waitTimeout = 0; - bool enableTimeout = kmdNotifyHelper->obtainTimeoutParams(waitTimeout, useQuickKmdSleep, *getTagAddress(), taskCountToWait, flushStampToWait); + bool enableTimeout = kmdNotifyHelper->obtainTimeoutParams(waitTimeout, useQuickKmdSleep, *getTagAddress(), taskCountToWait, flushStampToWait, forcePowerSavingMode); auto status = waitForCompletionWithTimeout(enableTimeout, waitTimeout, taskCountToWait); if (!status) { diff --git a/runtime/helpers/kmd_notify_properties.cpp b/runtime/helpers/kmd_notify_properties.cpp index e0564c7ea2..4b990e0e55 100644 --- a/runtime/helpers/kmd_notify_properties.cpp +++ b/runtime/helpers/kmd_notify_properties.cpp @@ -15,12 +15,13 @@ bool KmdNotifyHelper::obtainTimeoutParams(int64_t &timeoutValueOutput, bool quickKmdSleepRequest, uint32_t currentHwTag, uint32_t taskCountToWait, - FlushStamp flushStampToWait) { + FlushStamp flushStampToWait, + bool forcePowerSavingMode) { if (flushStampToWait == 0) { return false; } - if (DebugManager.flags.PowerSavingMode.get()) { + if (DebugManager.flags.PowerSavingMode.get() || forcePowerSavingMode) { timeoutValueOutput = 1; return true; } diff --git a/runtime/helpers/kmd_notify_properties.h b/runtime/helpers/kmd_notify_properties.h index 482f958e56..ee9b09a966 100644 --- a/runtime/helpers/kmd_notify_properties.h +++ b/runtime/helpers/kmd_notify_properties.h @@ -40,7 +40,8 @@ class KmdNotifyHelper { bool quickKmdSleepRequest, uint32_t currentHwTag, uint32_t taskCountToWait, - FlushStamp flushStampToWait); + FlushStamp flushStampToWait, + bool forcePowerSavingMode); bool quickKmdSleepForSporadicWaitsEnabled() const { return properties->enableQuickKmdSleepForSporadicWaits; } MOCKABLE_VIRTUAL void updateLastWaitForCompletionTimestamp(); diff --git a/unit_tests/helpers/kmd_notify_tests.cpp b/unit_tests/helpers/kmd_notify_tests.cpp index 866de136b3..745b8a665a 100644 --- a/unit_tests/helpers/kmd_notify_tests.cpp +++ b/unit_tests/helpers/kmd_notify_tests.cpp @@ -11,6 +11,7 @@ #include "unit_tests/helpers/debug_manager_state_restore.h" #include "unit_tests/mocks/mock_device.h" #include "unit_tests/mocks/mock_context.h" +#include "unit_tests/mocks/mock_command_queue.h" #include "test.h" #include "gmock/gmock.h" @@ -24,7 +25,7 @@ using namespace OCLRT; struct KmdNotifyTests : public ::testing::Test { void SetUp() override { device.reset(MockDevice::createWithNewExecutionEnvironment(&localHwInfo)); - cmdQ.reset(new CommandQueue(&context, device.get(), nullptr)); + cmdQ.reset(new MockCommandQueue(&context, device.get(), nullptr)); *device->getTagAddress() = taskCountToWait; device->getCommandStreamReceiver().waitForFlushStamp(flushStampToWait, *device->getOsContext()); overrideKmdNotifyParams(true, 2, true, 1, false, 0); @@ -90,7 +91,7 @@ struct KmdNotifyTests : public ::testing::Test { HardwareInfo localHwInfo = **platformDevices; MockContext context; std::unique_ptr device; - std::unique_ptr cmdQ; + std::unique_ptr cmdQ; FlushStamp flushStampToWait = 1000; uint32_t taskCountToWait = 5; }; @@ -177,7 +178,7 @@ HWTEST_F(KmdNotifyTests, givenZeroFlushStampWhenWaitIsCalledThenDisableTimeout) EXPECT_CALL(*csr, waitForCompletionWithTimeout(false, ::testing::_, taskCountToWait)).Times(1).WillOnce(::testing::Return(true)); EXPECT_CALL(*csr, waitForFlushStamp(::testing::_, ::testing::_)).Times(0); - csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 0, false, *device->getOsContext()); + csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 0, false, *device->getOsContext(), false); } HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsSporadicWaitThenOverrideQuickSleepRequest) { @@ -190,7 +191,7 @@ HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsSporadicWaitThenOverrid int64_t timeSinceLastWait = mockKmdNotifyHelper->properties->delayQuickKmdSleepForSporadicWaitsMicroseconds + 1; mockKmdNotifyHelper->lastWaitForCompletionTimestampUs = mockKmdNotifyHelper->getMicrosecondsSinceEpoch() - timeSinceLastWait; - csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext()); + csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext(), false); } HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsNotSporadicWaitThenOverrideQuickSleepRequest) { @@ -200,7 +201,31 @@ HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsNotSporadicWaitThenOver auto expectedDelay = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds; EXPECT_CALL(*csr, waitForCompletionWithTimeout(::testing::_, expectedDelay, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); - csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext()); + csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext(), false); +} + +HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenPowerSavingModeIsRequestedThenTimeoutIsEnabled) { + overrideKmdNotifyParams(false, 3, false, 2, false, 9999999); + auto csr = createMockCsr(); + EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, 1, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); + csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext(), true); +} + +HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModeAndCallWaitThenTimeoutIsEnabled) { + overrideKmdNotifyParams(false, 3, false, 2, false, 9999999); + auto csr = createMockCsr(); + EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, 1, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); + cmdQ->throttle = QueueThrottle::LOW; + cmdQ->waitUntilComplete(1, 1, false); +} + +HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModButThereIsNoFlushStampeAndCallWaitThenTimeoutIsDisabled) { + overrideKmdNotifyParams(false, 3, false, 2, false, 9999999); + auto csr = createMockCsr(); + EXPECT_CALL(*csr, waitForCompletionWithTimeout(false, 0, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); + + cmdQ->throttle = QueueThrottle::LOW; + cmdQ->waitUntilComplete(1, 0, false); } HWTEST_F(KmdNotifyTests, givenQuickSleepRequestWhenItsSporadicWaitOptimizationIsDisabledThenDontOverrideQuickSleepRequest) { @@ -210,7 +235,7 @@ HWTEST_F(KmdNotifyTests, givenQuickSleepRequestWhenItsSporadicWaitOptimizationIs auto expectedDelay = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds; EXPECT_CALL(*csr, waitForCompletionWithTimeout(::testing::_, expectedDelay, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); - csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, true, *device->getOsContext()); + csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, true, *device->getOsContext(), false); } HWTEST_F(KmdNotifyTests, givenTaskCountEqualToHwTagWhenWaitCalledThenDontMultiplyTimeout) { @@ -221,7 +246,7 @@ HWTEST_F(KmdNotifyTests, givenTaskCountEqualToHwTagWhenWaitCalledThenDontMultipl EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, expectedTimeout, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); - csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext()); + csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext(), false); } HWTEST_F(KmdNotifyTests, givenTaskCountLowerThanHwTagWhenWaitCalledThenDontMultiplyTimeout) { @@ -232,7 +257,7 @@ HWTEST_F(KmdNotifyTests, givenTaskCountLowerThanHwTagWhenWaitCalledThenDontMulti EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, expectedTimeout, ::testing::_)).Times(1).WillOnce(::testing::Return(true)); - csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext()); + csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, *device->getOsContext(), false); } HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWhenWaitCalledThenUpdateWaitTimestamp) { @@ -242,7 +267,7 @@ HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWhenWaitCalledThenUpda EXPECT_NE(0, mockKmdNotifyHelper->lastWaitForCompletionTimestampUs.load()); EXPECT_EQ(1u, mockKmdNotifyHelper->updateLastWaitForCompletionTimestampCalled); - csr->waitForTaskCountWithKmdNotifyFallback(0, 0, false, *device->getOsContext()); + csr->waitForTaskCountWithKmdNotifyFallback(0, 0, false, *device->getOsContext(), false); EXPECT_EQ(2u, mockKmdNotifyHelper->updateLastWaitForCompletionTimestampCalled); } @@ -252,7 +277,7 @@ HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWithDisabledSporadicWa auto csr = createMockCsr(); EXPECT_EQ(0, mockKmdNotifyHelper->lastWaitForCompletionTimestampUs.load()); - csr->waitForTaskCountWithKmdNotifyFallback(0, 0, false, *device->getOsContext()); + csr->waitForTaskCountWithKmdNotifyFallback(0, 0, false, *device->getOsContext(), false); EXPECT_EQ(0u, mockKmdNotifyHelper->updateLastWaitForCompletionTimestampCalled); } @@ -275,7 +300,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffLowerThanMinimumToCheckAcLineWhenObtain EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine); int64_t timeout = 0; - helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1); + helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false); EXPECT_EQ(0u, helper.updateAcLineStatusCalled); } @@ -290,7 +315,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffGreaterThanMinimumToCheckAcLineAndDisab EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine); int64_t timeout = 0; - helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1); + helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false); EXPECT_EQ(1u, helper.updateAcLineStatusCalled); } @@ -305,7 +330,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffGreaterThanMinimumToCheckAcLineAndEnabl EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine); int64_t timeout = 0; - helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1); + helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false); EXPECT_EQ(0u, helper.updateAcLineStatusCalled); } @@ -316,7 +341,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenAcLineIsDisconnectedTh helper.acLineConnected = false; int64_t timeout = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(KmdNotifyConstants::timeoutInMicrosecondsForDisconnectedAcLine, timeout); @@ -330,13 +355,13 @@ TEST_F(KmdNotifyTests, givenKmdNotifyEnabledWhenInitMaxPowerSavingModeIsCalledTh EXPECT_FALSE(helper.maxPowerSavingMode); int64_t timeout = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(2, timeout); helper.initMaxPowerSavingMode(); EXPECT_TRUE(helper.maxPowerSavingMode); - timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2); + timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(1, timeout); @@ -349,7 +374,7 @@ TEST_F(KmdNotifyTests, givenEnabledKmdNotifyMechanismWhenAcLineIsDisconnectedThe helper.acLineConnected = false; int64_t timeout = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(localHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds, timeout); @@ -362,7 +387,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismAndFlushStampIsZeroWhenAcL int64_t timeout = 0; FlushStamp flushStampToWait = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false); EXPECT_FALSE(timeoutEnabled); } @@ -376,7 +401,18 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenPowerSavingModeIsSetTh int64_t timeout = 0; FlushStamp flushStampToWait = 1; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false); + EXPECT_TRUE(timeoutEnabled); + EXPECT_EQ(1, timeout); +} + +TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenPowerSavingModeIsRequestedThenKmdNotifyMechanismIsUsedAndReturnsShortestWaitingTimePossible) { + localHwInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify = false; + MockKmdNotifyHelper helper(&(localHwInfo.capabilityTable.kmdNotifyProperties)); + + int64_t timeout = 0; + FlushStamp flushStampToWait = 1; + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, true); EXPECT_TRUE(timeoutEnabled); EXPECT_EQ(1, timeout); } @@ -390,7 +426,7 @@ TEST_F(KmdNotifyTests, givenEnabledKmdNotifyMechanismWhenPowerSavingModeIsSetAnd int64_t timeout = 0; FlushStamp flushStampToWait = 0; - bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait); + bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false); EXPECT_FALSE(timeoutEnabled); EXPECT_EQ(0, timeout); } diff --git a/unit_tests/kernel/kernel_tests.cpp b/unit_tests/kernel/kernel_tests.cpp index ea55cb9c85..2f339c1b2b 100644 --- a/unit_tests/kernel/kernel_tests.cpp +++ b/unit_tests/kernel/kernel_tests.cpp @@ -487,7 +487,7 @@ class CommandStreamReceiverMock : public CommandStreamReceiver { void addPipeControl(LinearStream &commandStream, bool dcFlush) override { } - void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool quickKmdSleep, OsContext &osContext) override { + void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool quickKmdSleep, OsContext &osContext, bool forcePowerSavingMode) override { } CompletionStamp flushTask( diff --git a/unit_tests/mocks/mock_command_queue.h b/unit_tests/mocks/mock_command_queue.h index 8fb1d23103..efaaed1c64 100644 --- a/unit_tests/mocks/mock_command_queue.h +++ b/unit_tests/mocks/mock_command_queue.h @@ -17,6 +17,7 @@ class MockCommandQueue : public CommandQueue { public: using CommandQueue::device; using CommandQueue::obtainNewTimestampPacketNodes; + using CommandQueue::throttle; using CommandQueue::timestampPacketContainer; void setProfilingEnabled() { diff --git a/unit_tests/mocks/mock_csr.h b/unit_tests/mocks/mock_csr.h index 88c2165fa7..49abe0c87b 100644 --- a/unit_tests/mocks/mock_csr.h +++ b/unit_tests/mocks/mock_csr.h @@ -237,7 +237,7 @@ class MockCommandStreamReceiver : public CommandStreamReceiver { } } - void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool quickKmdSleep, OsContext &osContext) override { + void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool quickKmdSleep, OsContext &osContext, bool forcePowerSavingMode) override { } void addPipeControl(LinearStream &commandStream, bool dcFlush) override { diff --git a/unit_tests/sharings/sharing_factory_tests.cpp b/unit_tests/sharings/sharing_factory_tests.cpp index bb4fa79b3a..102420fd18 100644 --- a/unit_tests/sharings/sharing_factory_tests.cpp +++ b/unit_tests/sharings/sharing_factory_tests.cpp @@ -250,7 +250,7 @@ TEST(Context, GivenVaContextWhenItIsCreatedItInitializesPowerSavingMode) { auto kmdNotifyHelper = commandStreamReceiver.peekKmdNotifyHelper(); int64_t timeout = 0; - kmdNotifyHelper->obtainTimeoutParams(timeout, true, 1, 10, 2); + kmdNotifyHelper->obtainTimeoutParams(timeout, true, 1, 10, 2, false); EXPECT_NE(1, timeout); cl_context_properties validProperties[5] = {CL_CONTEXT_PLATFORM, (cl_context_properties)platformId[0], @@ -259,7 +259,7 @@ TEST(Context, GivenVaContextWhenItIsCreatedItInitializesPowerSavingMode) { std::unique_ptr ctx(Context::create(validProperties, DeviceVector(&clDevice, 1), nullptr, nullptr, retVal)); EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_NE(nullptr, ctx); - kmdNotifyHelper->obtainTimeoutParams(timeout, true, 1, 10, 2); + kmdNotifyHelper->obtainTimeoutParams(timeout, true, 1, 10, 2, false); EXPECT_EQ(1, timeout); } @@ -278,7 +278,7 @@ TEST(Context, GivenNonVaContextWhenItIsCreatedItInitializesPowerSavingMode) { auto kmdNotifyHelper = commandStreamReceiver.peekKmdNotifyHelper(); int64_t timeout = 0; - kmdNotifyHelper->obtainTimeoutParams(timeout, true, 1, 10, 2); + kmdNotifyHelper->obtainTimeoutParams(timeout, true, 1, 10, 2, false); EXPECT_NE(1, timeout); cl_context_properties validProperties[5] = {CL_CONTEXT_PLATFORM, (cl_context_properties)platformId[0], @@ -287,6 +287,6 @@ TEST(Context, GivenNonVaContextWhenItIsCreatedItInitializesPowerSavingMode) { std::unique_ptr ctx(Context::create(validProperties, DeviceVector(&clDevice, 1), nullptr, nullptr, retVal)); EXPECT_EQ(CL_SUCCESS, retVal); EXPECT_NE(nullptr, ctx); - kmdNotifyHelper->obtainTimeoutParams(timeout, true, 1, 10, 2); + kmdNotifyHelper->obtainTimeoutParams(timeout, true, 1, 10, 2, false); EXPECT_NE(1, timeout); }