Add new KMD delay parameter for direct submission

Related-To: NEO-5845

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-12-17 18:42:13 +00:00
committed by Compute-Runtime-Automation
parent 9d5907c8d0
commit 82096a5472
40 changed files with 219 additions and 120 deletions

View File

@ -30,6 +30,8 @@ GEN11TEST_F(Gen11DeviceCaps, GivenWhenGettingKmdNotifyPropertiesThenItIsDisabled
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
GEN11TEST_F(Gen11DeviceCaps, WhenCheckingCompressionThenItIsDisabled) {

View File

@ -61,6 +61,8 @@ GEN12LPTEST_F(Gen12LpDeviceCaps, WhenCheckingCapsThenKmdNotifyMechanismIsCorrect
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
GEN12LPTEST_F(Gen12LpDeviceCaps, WhenCheckingCapsThenCompressionIsDisabled) {

View File

@ -21,4 +21,6 @@ BDWTEST_F(BdwDeviceCaps, WhenCheckingKmdNotifyPropertiesThenKmdNotifyIsEnabledCo
EXPECT_EQ(5000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(200000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}

View File

@ -44,6 +44,8 @@ GEN8TEST_F(Gen8DeviceCaps, WhenCheckingKmdNotifyMechanismThenPropertiesAreSetCor
EXPECT_EQ(5000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(200000, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
GEN8TEST_F(Gen8DeviceCaps, WhenCheckingCompressionThenItIsDisabled) {

View File

@ -20,4 +20,6 @@ BXTTEST_F(BxtDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisab
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}

View File

@ -95,6 +95,8 @@ CFLTEST_F(HwInfoConfigTestLinuxCfl, WhenConfiguringHwInfoThenInformationIsCorrec
EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
CFLTEST_F(HwInfoConfigTestLinuxCfl, GivenUnknownDevIdWhenConfiguringHwInfoThenErrorIsReturned) {

View File

@ -20,4 +20,6 @@ CFLTEST_F(CflDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisab
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}

View File

@ -102,6 +102,8 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, WhenConfiguringHwInfoThenInformationIsCorrec
EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
GLKTEST_F(HwInfoConfigTestLinuxGlk, GivenInvalidInputWhenConfiguringHwInfoThenErrorIsReturned) {

View File

@ -20,4 +20,6 @@ GLKTEST_F(GlkDeviceCapsWindows, WhenCheckingKmdNotifyPropertiesThenKmdNotifyIsEn
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}

View File

@ -137,6 +137,8 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, WhenConfiguringHwInfoThenInformationIsCorrec
EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
KBLTEST_F(HwInfoConfigTestLinuxKbl, GivenUnknownDevIdWhenConfiguringHwInfoThenErrorIsReturned) {

View File

@ -20,4 +20,6 @@ KBLTEST_F(KblDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisab
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}

View File

@ -135,6 +135,8 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, WhenConfiguringHwInfoThenInformationIsCorrec
EXPECT_EQ(5000, outKmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_TRUE(outKmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(200000, outKmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(outKmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, outKmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
SKLTEST_F(HwInfoConfigTestLinuxSkl, GivenUnknownDevIdWhenConfiguringHwInfoThenErrorIsReturned) {

View File

@ -20,4 +20,6 @@ SKLTEST_F(SklDeviceCapsWindows, GivenWhenGettingKmdNotifyPropertiesThenItIsDisab
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}

View File

@ -26,12 +26,13 @@ struct KmdNotifyTests : public ::testing::Test {
cmdQ.reset(new MockCommandQueue(&context, device.get(), nullptr, false));
*device->getDefaultEngine().commandStreamReceiver->getTagAddress() = taskCountToWait;
cmdQ->getGpgpuCommandStreamReceiver().waitForFlushStamp(flushStampToWait);
overrideKmdNotifyParams(true, 2, true, 1, false, 0);
overrideKmdNotifyParams(true, 2, true, 1, false, 0, false, 0);
}
void overrideKmdNotifyParams(bool kmdNotifyEnable, int64_t kmdNotifyDelay,
bool quickKmdSleepEnable, int64_t quickKmdSleepDelay,
bool quickKmdSleepEnableForSporadicWaits, int64_t quickKmdSleepDelayForSporadicWaits) {
bool quickKmdSleepEnableForSporadicWaits, int64_t quickKmdSleepDelayForSporadicWaits,
bool quickKmdSleepEnableForDirectSubmission, int64_t quickKmdSleepDelayForDirectSubmission) {
auto &properties = hwInfo->capabilityTable.kmdNotifyProperties;
properties.enableKmdNotify = kmdNotifyEnable;
properties.delayKmdNotifyMicroseconds = kmdNotifyDelay;
@ -39,6 +40,8 @@ struct KmdNotifyTests : public ::testing::Test {
properties.delayQuickKmdSleepMicroseconds = quickKmdSleepDelay;
properties.enableQuickKmdSleepForSporadicWaits = quickKmdSleepEnableForSporadicWaits;
properties.delayQuickKmdSleepForSporadicWaitsMicroseconds = quickKmdSleepDelayForSporadicWaits;
properties.enableQuickKmdSleepForDirectSubmission = quickKmdSleepEnableForDirectSubmission;
properties.delayQuickKmdSleepForDirectSubmissionMicroseconds = quickKmdSleepDelayForDirectSubmission;
}
class MockKmdNotifyHelper : public KmdNotifyHelper {
@ -103,7 +106,7 @@ HWTEST_F(KmdNotifyTests, givenTaskCountWhenWaitUntilCompletionCalledThenAlwaysTr
}
HWTEST_F(KmdNotifyTests, givenTaskCountAndKmdNotifyDisabledWhenWaitUntilCompletionCalledThenTryCpuPollingWithoutTimeout) {
overrideKmdNotifyParams(false, 0, false, 0, false, 0);
overrideKmdNotifyParams(false, 0, false, 0, false, 0, false, 0);
auto csr = createMockCsr<FamilyType>();
EXPECT_CALL(*csr, waitForCompletionWithTimeout(false, 0, taskCountToWait)).Times(1).WillOnce(::testing::Return(true));
@ -154,7 +157,7 @@ HWTEST_F(KmdNotifyTests, givenEnabledQuickSleepWhenWaitUntilCompleteIsCalledThen
}
HWTEST_F(KmdNotifyTests, givenDisabledQuickSleepWhenWaitUntilCompleteWithQuickSleepRequestIsCalledThenUseBaseDelayValue) {
overrideKmdNotifyParams(true, 1, false, 0, false, 0);
overrideKmdNotifyParams(true, 1, false, 0, false, 0, false, 0);
auto csr = createMockCsr<FamilyType>();
auto expectedTimeout = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds;
@ -180,7 +183,7 @@ HWTEST_F(KmdNotifyTests, givenZeroFlushStampWhenWaitIsCalledThenDisableTimeout)
}
HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsSporadicWaitThenOverrideQuickSleepRequest) {
overrideKmdNotifyParams(true, 3, true, 2, true, 1);
overrideKmdNotifyParams(true, 3, true, 2, true, 1, false, 0);
auto csr = createMockCsr<FamilyType>();
auto expectedDelay = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds;
@ -193,7 +196,7 @@ HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsSporadicWaitThenOverrid
}
HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsNotSporadicWaitThenOverrideQuickSleepRequest) {
overrideKmdNotifyParams(true, 3, true, 2, true, 9999999);
overrideKmdNotifyParams(true, 3, true, 2, true, 9999999, false, 0);
auto csr = createMockCsr<FamilyType>();
auto expectedDelay = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds;
@ -203,14 +206,14 @@ HWTEST_F(KmdNotifyTests, givenNonQuickSleepRequestWhenItsNotSporadicWaitThenOver
}
HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenPowerSavingModeIsRequestedThenTimeoutIsEnabled) {
overrideKmdNotifyParams(false, 3, false, 2, false, 9999999);
overrideKmdNotifyParams(false, 3, false, 2, false, 9999999, false, 0);
auto csr = createMockCsr<FamilyType>();
EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, 1, ::testing::_)).Times(1).WillOnce(::testing::Return(true));
csr->waitForTaskCountWithKmdNotifyFallback(taskCountToWait, 1, false, true);
}
HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModeAndCallWaitThenTimeoutIsEnabled) {
overrideKmdNotifyParams(false, 3, false, 2, false, 9999999);
overrideKmdNotifyParams(false, 3, false, 2, false, 9999999, false, 0);
auto csr = createMockCsr<FamilyType>();
EXPECT_CALL(*csr, waitForCompletionWithTimeout(true, 1, ::testing::_)).Times(1).WillOnce(::testing::Return(true));
cmdQ->throttle = QueueThrottle::LOW;
@ -218,7 +221,7 @@ HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModeAndCal
}
HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModButThereIsNoFlushStampeAndCallWaitThenTimeoutIsDisabled) {
overrideKmdNotifyParams(false, 3, false, 2, false, 9999999);
overrideKmdNotifyParams(false, 3, false, 2, false, 9999999, false, 0);
auto csr = createMockCsr<FamilyType>();
EXPECT_CALL(*csr, waitForCompletionWithTimeout(false, 0, ::testing::_)).Times(1).WillOnce(::testing::Return(true));
@ -227,7 +230,7 @@ HWTEST_F(KmdNotifyTests, givenKmdNotifyDisabledWhenQueueHasPowerSavingModButTher
}
HWTEST_F(KmdNotifyTests, givenQuickSleepRequestWhenItsSporadicWaitOptimizationIsDisabledThenDontOverrideQuickSleepRequest) {
overrideKmdNotifyParams(true, 3, true, 2, false, 0);
overrideKmdNotifyParams(true, 3, true, 2, false, 0, false, 0);
auto csr = createMockCsr<FamilyType>();
auto expectedDelay = device->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds;
@ -259,7 +262,7 @@ HWTEST_F(KmdNotifyTests, givenTaskCountLowerThanHwTagWhenWaitCalledThenDontMulti
}
HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWhenWaitCalledThenUpdateWaitTimestamp) {
overrideKmdNotifyParams(true, 3, true, 2, true, 1);
overrideKmdNotifyParams(true, 3, true, 2, true, 1, false, 0);
auto csr = createMockCsr<FamilyType>();
EXPECT_NE(0, mockKmdNotifyHelper->lastWaitForCompletionTimestampUs.load());
@ -270,7 +273,7 @@ HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWhenWaitCalledThenUpda
}
HWTEST_F(KmdNotifyTests, givenDefaultCommandStreamReceiverWithDisabledSporadicWaitOptimizationWhenWaitCalledThenDontUpdateWaitTimestamp) {
overrideKmdNotifyParams(true, 3, true, 2, false, 0);
overrideKmdNotifyParams(true, 3, true, 2, false, 0, false, 0);
auto csr = createMockCsr<FamilyType>();
EXPECT_EQ(0, mockKmdNotifyHelper->lastWaitForCompletionTimestampUs.load());
@ -298,7 +301,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffLowerThanMinimumToCheckAcLineWhenObtain
EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine);
int64_t timeout = 0;
helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true);
helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true, false);
EXPECT_EQ(0u, helper.updateAcLineStatusCalled);
}
@ -313,7 +316,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffGreaterThanMinimumToCheckAcLineAndDisab
EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine);
int64_t timeout = 0;
helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true);
helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true, false);
EXPECT_EQ(1u, helper.updateAcLineStatusCalled);
}
@ -322,7 +325,7 @@ TEST_F(KmdNotifyTests, givenKmdWaitModeNotActiveWhenObtainTimeoutParamsThenFalse
MockKmdNotifyHelper helper(&(hwInfo->capabilityTable.kmdNotifyProperties));
int64_t timeout = 0;
auto enableTimeout = helper.obtainTimeoutParams(timeout, false, 1, 1, 1, false, false);
auto enableTimeout = helper.obtainTimeoutParams(timeout, false, 1, 1, 1, false, false, false);
EXPECT_FALSE(enableTimeout);
EXPECT_FALSE(timeout);
@ -338,7 +341,7 @@ TEST_F(KmdNotifyTests, givenTaskCountDiffGreaterThanMinimumToCheckAcLineAndEnabl
EXPECT_EQ(10u, KmdNotifyConstants::minimumTaskCountDiffToCheckAcLine);
int64_t timeout = 0;
helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true);
helper.obtainTimeoutParams(timeout, false, hwTag, taskCountToWait, 1, false, true, false);
EXPECT_EQ(0u, helper.updateAcLineStatusCalled);
}
@ -349,7 +352,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenAcLineIsDisconnectedTh
helper.acLineConnected = false;
int64_t timeout = 0;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false, true);
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false, true, false);
EXPECT_TRUE(timeoutEnabled);
EXPECT_EQ(KmdNotifyConstants::timeoutInMicrosecondsForDisconnectedAcLine, timeout);
@ -363,7 +366,7 @@ TEST_F(KmdNotifyTests, givenEnabledKmdNotifyMechanismWhenAcLineIsDisconnectedThe
helper.acLineConnected = false;
int64_t timeout = 0;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false, true);
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, 2, false, true, false);
EXPECT_TRUE(timeoutEnabled);
EXPECT_EQ(hwInfo->capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds, timeout);
@ -376,7 +379,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismAndFlushStampIsZeroWhenAcL
int64_t timeout = 0;
FlushStamp flushStampToWait = 0;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true);
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, false);
EXPECT_FALSE(timeoutEnabled);
}
@ -390,7 +393,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenPowerSavingModeIsSetTh
int64_t timeout = 0;
FlushStamp flushStampToWait = 1;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true);
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, false);
EXPECT_TRUE(timeoutEnabled);
EXPECT_EQ(1, timeout);
}
@ -401,7 +404,7 @@ TEST_F(KmdNotifyTests, givenDisabledKmdNotifyMechanismWhenPowerSavingModeIsReque
int64_t timeout = 0;
FlushStamp flushStampToWait = 1;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, true, true);
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, true, true, false);
EXPECT_TRUE(timeoutEnabled);
EXPECT_EQ(1, timeout);
}
@ -415,7 +418,49 @@ TEST_F(KmdNotifyTests, givenEnabledKmdNotifyMechanismWhenPowerSavingModeIsSetAnd
int64_t timeout = 0;
FlushStamp flushStampToWait = 0;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true);
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, false);
EXPECT_FALSE(timeoutEnabled);
EXPECT_EQ(0, timeout);
}
TEST_F(KmdNotifyTests, givenEnabledKmdDirectSubmissionNotifyMechanismWhenDirectSubmissionIsEnabledThenSelectDelayTimeoutForDirectSubmission) {
overrideKmdNotifyParams(true, 150, false, 0, false, 0, true, 20);
MockKmdNotifyHelper helper(&(hwInfo->capabilityTable.kmdNotifyProperties));
constexpr int64_t expectedTimeout = 20;
constexpr bool directSubmission = true;
int64_t timeout = 0;
FlushStamp flushStampToWait = 1;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, directSubmission);
EXPECT_TRUE(timeoutEnabled);
EXPECT_EQ(expectedTimeout, timeout);
}
TEST_F(KmdNotifyTests, givenEnabledKmdDirectSubmissionNotifyMechanismWhenDirectSubmissionIsDisabledThenSelectBaseDelayTimeout) {
overrideKmdNotifyParams(true, 150, false, 0, false, 0, true, 20);
MockKmdNotifyHelper helper(&(hwInfo->capabilityTable.kmdNotifyProperties));
constexpr int64_t expectedTimeout = 150;
constexpr bool directSubmission = false;
int64_t timeout = 0;
FlushStamp flushStampToWait = 1;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, directSubmission);
EXPECT_TRUE(timeoutEnabled);
EXPECT_EQ(expectedTimeout, timeout);
}
TEST_F(KmdNotifyTests, givenDisabledKmdDirectSubmissionNotifyMechanismWhenDirectSubmissionIsEnabledThenSelectBaseDelayTimeout) {
overrideKmdNotifyParams(true, 150, false, 0, false, 0, false, 20);
MockKmdNotifyHelper helper(&(hwInfo->capabilityTable.kmdNotifyProperties));
constexpr int64_t expectedTimeout = 150;
constexpr bool directSubmission = true;
int64_t timeout = 0;
FlushStamp flushStampToWait = 1;
bool timeoutEnabled = helper.obtainTimeoutParams(timeout, false, 1, 2, flushStampToWait, false, true, directSubmission);
EXPECT_TRUE(timeoutEnabled);
EXPECT_EQ(expectedTimeout, timeout);
}

View File

@ -68,6 +68,8 @@ TEST_F(DeviceFactoryTest, WhenOverridingUsingDebugManagerThenOverridesAreApplied
auto refDelayQuickKmdSleepMicroseconds = hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds;
auto refEnableQuickKmdSleepForSporadicWaits = hwInfo->capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits;
auto refDelayQuickKmdSleepForSporadicWaitsMicroseconds = hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds;
auto refEnableQuickKmdSleepForDirectSubmission = hwInfo->capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission;
auto refDelayQuickKmdSleepForDirectSubmissionMicroseconds = hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds;
DebugManager.flags.OverrideEnableKmdNotify.set(!refEnableKmdNotify);
DebugManager.flags.OverrideKmdNotifyDelayMicroseconds.set(static_cast<int32_t>(refDelayKmdNotifyMicroseconds) + 10);
@ -78,6 +80,9 @@ TEST_F(DeviceFactoryTest, WhenOverridingUsingDebugManagerThenOverridesAreApplied
DebugManager.flags.OverrideEnableQuickKmdSleepForSporadicWaits.set(!refEnableQuickKmdSleepForSporadicWaits);
DebugManager.flags.OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds.set(static_cast<int32_t>(refDelayQuickKmdSleepForSporadicWaitsMicroseconds) + 12);
DebugManager.flags.OverrideEnableQuickKmdSleepForDirectSubmission.set(!refEnableQuickKmdSleepForDirectSubmission);
DebugManager.flags.OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds.set(static_cast<int32_t>(refDelayQuickKmdSleepForDirectSubmissionMicroseconds) + 15);
platformsImpl->clear();
executionEnvironment = constructPlatform()->peekExecutionEnvironment();
success = DeviceFactory::prepareDeviceEnvironments(*executionEnvironment);
@ -94,6 +99,11 @@ TEST_F(DeviceFactoryTest, WhenOverridingUsingDebugManagerThenOverridesAreApplied
hwInfo->capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(refDelayQuickKmdSleepForSporadicWaitsMicroseconds + 12,
hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
EXPECT_EQ(!refEnableQuickKmdSleepForDirectSubmission,
hwInfo->capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
EXPECT_EQ(refDelayQuickKmdSleepForDirectSubmissionMicroseconds + 15,
hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
}
TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetWhenCreateDevicesThenProperNumberOfDevicesIsReturned) {

View File

@ -156,6 +156,8 @@ OverrideEnableQuickKmdSleep = -1
OverrideQuickKmdSleepDelayMicroseconds = -1
OverrideEnableQuickKmdSleepForSporadicWaits = -1
OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds = -1
OverrideEnableQuickKmdSleepForDirectSubmission = -1
OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds = -1
PowerSavingMode = 0
CsrDispatchMode = 0
OverrideDefaultFP64Settings = -1

View File

@ -855,7 +855,8 @@ inline void CommandStreamReceiverHw<GfxFamily>::waitForTaskCountWithKmdNotifyFal
int64_t waitTimeout = 0;
bool enableTimeout = false;
enableTimeout = kmdNotifyHelper->obtainTimeoutParams(waitTimeout, useQuickKmdSleep, *getTagAddress(), taskCountToWait, flushStampToWait, forcePowerSavingMode, this->isKmdWaitModeActive());
enableTimeout = kmdNotifyHelper->obtainTimeoutParams(waitTimeout, useQuickKmdSleep, *getTagAddress(), taskCountToWait, flushStampToWait, forcePowerSavingMode, this->isKmdWaitModeActive(),
this->isAnyDirectSubmissionEnabled());
PRINT_DEBUG_STRING(DebugManager.flags.LogWaitingForCompletion.get(), stdout,
"\nWaiting for task count %u at location %p. Current value: %u\n",

View File

@ -314,6 +314,8 @@ DECLARE_DEBUG_VARIABLE(int32_t, OverrideEnableQuickKmdSleep, -1, "-1: dont overr
DECLARE_DEBUG_VARIABLE(int32_t, OverrideQuickKmdSleepDelayMicroseconds, -1, "-1: dont override, 0: infinite timeout, >0: timeout in microseconds")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideEnableQuickKmdSleepForSporadicWaits, -1, "-1: dont override, 0: disable, 1: enable. It works only when QuickKmdSleep is enabled.")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds, -1, "-1: dont override, >0: timeout in microseconds")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideEnableQuickKmdSleepForDirectSubmission, -1, "-1: dont override, 0: disable, 1: enable. It works only when QuickKmdSleep is enabled.")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds, -1, "-1: dont override, >0: timeout in microseconds")
DECLARE_DEBUG_VARIABLE(int32_t, PowerSavingMode, 0, "0: default 1: enable. Whenever driver waits on GPU and its not ready, put waiting thread to sleep and wait for notification.")
DECLARE_DEBUG_VARIABLE(int32_t, CsrDispatchMode, 0, "Chooses DispatchMode for Csr")
DECLARE_DEBUG_VARIABLE(int32_t, RenderCompressedImagesEnabled, -1, "-1: default, 0: disabled, 1: enabled")

View File

@ -37,12 +37,14 @@ const PLATFORM EHL::platform = {
const RuntimeCapabilityTable EHL::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max36BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationEHL, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -65,8 +67,6 @@ const RuntimeCapabilityTable EHL::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -38,12 +38,14 @@ const PLATFORM ICLLP::platform = {
const RuntimeCapabilityTable ICLLP::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationICLLP, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -66,8 +68,6 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{
false, // ftrRenderCompressedImages
false, // ftr64KBpages
true, // instrumentationEnabled
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
true, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -37,12 +37,14 @@ const PLATFORM LKF::platform = {
const RuntimeCapabilityTable LKF::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max36BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationLKF, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -65,8 +67,6 @@ const RuntimeCapabilityTable LKF::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -35,12 +35,14 @@ const RuntimeCapabilityTable ADLP::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationADLP, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -63,8 +65,6 @@ const RuntimeCapabilityTable ADLP::capabilityTable{
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -35,12 +35,14 @@ const RuntimeCapabilityTable ADLS::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationADLS, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -63,8 +65,6 @@ const RuntimeCapabilityTable ADLS::capabilityTable{
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -43,12 +43,14 @@ const RuntimeCapabilityTable DG1::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationDG1, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -71,8 +73,6 @@ const RuntimeCapabilityTable DG1::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
true, // supportCacheFlushAfterWalker

View File

@ -35,12 +35,14 @@ const RuntimeCapabilityTable RKL::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationRKL, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -63,8 +65,6 @@ const RuntimeCapabilityTable RKL::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -39,12 +39,14 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}},
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationTGLLP, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -67,8 +69,6 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{
false, // ftrRenderCompressedImages
true, // instrumentationEnabled
true, // ftr64KBpages
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -42,12 +42,14 @@ const PLATFORM BDW::platform = {
const RuntimeCapabilityTable BDW::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{50000, 5000, 200000, true, true, true}, // kmdNotifyProperties
{50000, 5000, 200000, 0, true, true, true, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
80, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationBDW, // isSimulation
"core", // platformType
"", // deviceName
PreemptionMode::Disabled, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -70,8 +72,6 @@ const RuntimeCapabilityTable BDW::capabilityTable{
false, // ftrRenderCompressedImages
false, // ftr64KBpages
true, // instrumentationEnabled
"core", // platformType
"", // deviceName
false, // sourceLevelDebuggerSupported
false, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -39,12 +39,14 @@ const PLATFORM BXT::platform = {
const RuntimeCapabilityTable BXT::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
52.083, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationBXT, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -67,8 +69,6 @@ const RuntimeCapabilityTable BXT::capabilityTable{
false, // ftrRenderCompressedImages
false, // ftr64KBpages
true, // instrumentationEnabled
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
true, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -34,12 +34,14 @@ const PLATFORM CFL::platform = {
const RuntimeCapabilityTable CFL::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationCFL, // isSimulation
"core", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -62,8 +64,6 @@ const RuntimeCapabilityTable CFL::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"core", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
true, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -34,12 +34,14 @@ const PLATFORM GLK::platform = {
const RuntimeCapabilityTable GLK::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{30000, 0, 0, true, false, false}, // kmdNotifyProperties
{30000, 0, 0, 0, true, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
52.083, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationGLK, // isSimulation
"lp", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -62,8 +64,6 @@ const RuntimeCapabilityTable GLK::capabilityTable{
false, // ftrRenderCompressedImages
false, // ftr64KBpages
true, // instrumentationEnabled
"lp", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
true, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -34,12 +34,14 @@ const PLATFORM KBL::platform = {
const RuntimeCapabilityTable KBL::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationKBL, // isSimulation
"core", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -62,8 +64,6 @@ const RuntimeCapabilityTable KBL::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"core", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
true, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -42,12 +42,14 @@ const PLATFORM SKL::platform = {
const RuntimeCapabilityTable SKL::capabilityTable{
EngineDirectSubmissionInitVec{
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationSKL, // isSimulation
"core", // platformType
"", // deviceName
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
@ -70,8 +72,6 @@ const RuntimeCapabilityTable SKL::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"core", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
true, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -28,6 +28,8 @@ struct RuntimeCapabilityTable {
double defaultProfilingTimerResolution;
size_t requiredPreemptionSurfaceSize;
bool (*isSimulation)(unsigned short);
const char *platformType;
const char *deviceName;
PreemptionMode defaultPreemptionMode;
aub_stream::EngineType defaultEngineType;
uint32_t maxRenderFrequency;
@ -50,8 +52,6 @@ struct RuntimeCapabilityTable {
bool ftrRenderCompressedImages;
bool ftr64KBpages;
bool instrumentationEnabled;
const char *platformType;
const char *deviceName;
bool debuggerSupported;
bool supportsVme;
bool supportCacheFlushAfterWalker;
@ -83,6 +83,8 @@ inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilit
result &= (lhs.kmdNotifyProperties.delayKmdNotifyMicroseconds == rhs.kmdNotifyProperties.delayKmdNotifyMicroseconds);
result &= (lhs.kmdNotifyProperties.delayQuickKmdSleepMicroseconds == rhs.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
result &= (lhs.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds == rhs.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
result &= (lhs.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission == rhs.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
result &= (lhs.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds == rhs.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
result &= (lhs.kmdNotifyProperties.enableKmdNotify == rhs.kmdNotifyProperties.enableKmdNotify);
result &= (lhs.kmdNotifyProperties.enableQuickKmdSleep == rhs.kmdNotifyProperties.enableQuickKmdSleep);
result &= (lhs.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits == rhs.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);

View File

@ -19,7 +19,8 @@ bool KmdNotifyHelper::obtainTimeoutParams(int64_t &timeoutValueOutput,
uint32_t taskCountToWait,
FlushStamp flushStampToWait,
bool forcePowerSavingMode,
bool kmdWaitModeActive) {
bool kmdWaitModeActive,
bool directSubmissionEnabled) {
if (flushStampToWait == 0) {
return false;
}
@ -44,6 +45,8 @@ bool KmdNotifyHelper::obtainTimeoutParams(int64_t &timeoutValueOutput,
timeoutValueOutput = KmdNotifyConstants::timeoutInMicrosecondsForDisconnectedAcLine;
} else if (quickKmdSleepRequest && properties->enableQuickKmdSleep) {
timeoutValueOutput = properties->delayQuickKmdSleepMicroseconds;
} else if (directSubmissionEnabled && properties->enableQuickKmdSleepForDirectSubmission) {
timeoutValueOutput = properties->delayQuickKmdSleepForDirectSubmissionMicroseconds;
} else {
timeoutValueOutput = getBaseTimeout(multiplier);
}

View File

@ -17,12 +17,15 @@ struct KmdNotifyProperties {
int64_t delayKmdNotifyMicroseconds;
int64_t delayQuickKmdSleepMicroseconds;
int64_t delayQuickKmdSleepForSporadicWaitsMicroseconds;
int64_t delayQuickKmdSleepForDirectSubmissionMicroseconds;
// Main switch for KMD Notify optimization - if its disabled, all below are disabled too
bool enableKmdNotify;
// Use smaller delay in specific situations (ie. from AsyncEventsHandler)
bool enableQuickKmdSleep;
// If waits are called sporadically use QuickKmdSleep mode, otherwise use standard delay
bool enableQuickKmdSleepForSporadicWaits;
// If direct submission is enabled, use direct submission delay, otherwise use standard delay
bool enableQuickKmdSleepForDirectSubmission;
};
namespace KmdNotifyConstants {
@ -42,7 +45,8 @@ class KmdNotifyHelper {
uint32_t taskCountToWait,
FlushStamp flushStampToWait,
bool forcePowerSavingMode,
bool kmdWaitModeActive);
bool kmdWaitModeActive,
bool directSubmissionEnabled);
bool quickKmdSleepForSporadicWaitsEnabled() const { return properties->enableQuickKmdSleepForSporadicWaits; }
MOCKABLE_VIRTUAL void updateLastWaitForCompletionTimestamp();

View File

@ -196,6 +196,8 @@ int HwInfoConfig::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideQuickKmdSleepDelayMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForSporadicWaits.get(), kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForDirectSubmission.get(), kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
return 0;
}

View File

@ -47,6 +47,8 @@ int HwInfoConfig::configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInfo
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideQuickKmdSleepDelayMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForSporadicWaits.get(), kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForSporadicWaitsMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForDirectSubmission.get(), kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
// Product specific config
int ret = configureHardwareCustom(outHwInfo, osIface);

View File

@ -39,12 +39,14 @@ const RuntimeCapabilityTable XE_HP_SDV::capabilityTable{
{aub_stream::ENGINE_CCS1, {true, false, true, true}},
{aub_stream::ENGINE_CCS2, {true, false, true, true}},
{aub_stream::ENGINE_CCS3, {true, false, true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationXEHP, // isSimulation
"core", // platformType
"", // deviceName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
@ -67,8 +69,6 @@ const RuntimeCapabilityTable XE_HP_SDV::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"core", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
true, // supportCacheFlushAfterWalker

View File

@ -47,12 +47,14 @@ const RuntimeCapabilityTable PVC::capabilityTable{
{aub_stream::ENGINE_BCS6, {true, false, true, true}},
{aub_stream::ENGINE_BCS7, {true, false, true, true}},
{aub_stream::ENGINE_BCS8, {true, false, true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
maxNBitValue(57), // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationPVC, // isSimulation
"core", // platformType
"", // deviceName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
@ -75,8 +77,6 @@ const RuntimeCapabilityTable PVC::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"core", // platformType
"", // deviceName
false, // sourceLevelDebuggerSupported
false, // supportsVme
false, // supportCacheFlushAfterWalker

View File

@ -39,12 +39,14 @@ const RuntimeCapabilityTable DG2::capabilityTable{
{aub_stream::ENGINE_CCS1, {true, false, true, true}},
{aub_stream::ENGINE_CCS2, {true, false, true, true}},
{aub_stream::ENGINE_CCS3, {true, false, true, true}}}, // directSubmissionEngines
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
MemoryConstants::max48BitAddress, // gpuAddressSpace
0, // sharedSystemMemCapabilities
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationDG2, // isSimulation
"dg2", // platformType
"", // deviceName
PreemptionMode::ThreadGroup, // defaultPreemptionMode
aub_stream::ENGINE_CCS, // defaultEngineType
0, // maxRenderFrequency
@ -67,8 +69,6 @@ const RuntimeCapabilityTable DG2::capabilityTable{
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
"dg2", // platformType
"", // deviceName
true, // sourceLevelDebuggerSupported
false, // supportsVme
true, // supportCacheFlushAfterWalker