Add debug flag to override notify enable parameter
Related-To: NEO-5845 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
parent
4ab42a847c
commit
9e6f84e01d
|
@ -61,6 +61,10 @@ DrmCommandStreamReceiver<GfxFamily>::DrmCommandStreamReceiver(ExecutionEnvironme
|
|||
useContextForUserFenceWait = !!(overrideUserFenceUseCtxId);
|
||||
}
|
||||
useNotifyEnableForPostSync = useUserFenceWait;
|
||||
int overrideUseNotifyEnableForPostSync = DebugManager.flags.OverrideNotifyEnableForTagUpdatePostSync.get();
|
||||
if (overrideUseNotifyEnableForPostSync != -1) {
|
||||
useNotifyEnableForPostSync = !!(overrideUseNotifyEnableForPostSync);
|
||||
}
|
||||
kmdWaitTimeout = DebugManager.flags.SetKmdWaitTimeout.get();
|
||||
}
|
||||
|
||||
|
|
|
@ -1933,6 +1933,76 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
|||
EXPECT_EQ(Drm::ValueWidth::U32, mock->waitUserFenceCall.dataWidth);
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
||||
givenWaitUserFenceSetWhenDrmCsrIsCreatedThenUseNotifyEnableFlagIsSet) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableUserFenceForCompletionWait.set(1);
|
||||
|
||||
mock->isVmBindAvailableCall.callParent = false;
|
||||
mock->isVmBindAvailableCall.returnValue = true;
|
||||
|
||||
std::unique_ptr<TestedDrmCommandStreamReceiver<FamilyType>> testedCsr =
|
||||
std::make_unique<TestedDrmCommandStreamReceiver<FamilyType>>(gemCloseWorkerMode::gemCloseWorkerInactive,
|
||||
*this->executionEnvironment,
|
||||
1);
|
||||
|
||||
EXPECT_TRUE(testedCsr->useUserFenceWait);
|
||||
EXPECT_TRUE(testedCsr->isUsedNotifyEnableForPostSync());
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
||||
givenWaitUserFenceNotSetWhenDrmCsrIsCreatedThenUseNotifyEnableFlagIsNotSet) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableUserFenceForCompletionWait.set(0);
|
||||
|
||||
mock->isVmBindAvailableCall.callParent = false;
|
||||
mock->isVmBindAvailableCall.returnValue = true;
|
||||
|
||||
std::unique_ptr<TestedDrmCommandStreamReceiver<FamilyType>> testedCsr =
|
||||
std::make_unique<TestedDrmCommandStreamReceiver<FamilyType>>(gemCloseWorkerMode::gemCloseWorkerInactive,
|
||||
*this->executionEnvironment,
|
||||
1);
|
||||
|
||||
EXPECT_FALSE(testedCsr->useUserFenceWait);
|
||||
EXPECT_FALSE(testedCsr->isUsedNotifyEnableForPostSync());
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
||||
givenWaitUserFenceNotSetAndOverrideNotifyEnableSetWhenDrmCsrIsCreatedThenUseNotifyEnableFlagIsSet) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableUserFenceForCompletionWait.set(0);
|
||||
DebugManager.flags.OverrideNotifyEnableForTagUpdatePostSync.set(1);
|
||||
|
||||
mock->isVmBindAvailableCall.callParent = false;
|
||||
mock->isVmBindAvailableCall.returnValue = true;
|
||||
|
||||
std::unique_ptr<TestedDrmCommandStreamReceiver<FamilyType>> testedCsr =
|
||||
std::make_unique<TestedDrmCommandStreamReceiver<FamilyType>>(gemCloseWorkerMode::gemCloseWorkerInactive,
|
||||
*this->executionEnvironment,
|
||||
1);
|
||||
|
||||
EXPECT_FALSE(testedCsr->useUserFenceWait);
|
||||
EXPECT_TRUE(testedCsr->isUsedNotifyEnableForPostSync());
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
||||
givenWaitUserFenceSetAndOverrideNotifyEnableNotSetWhenDrmCsrIsCreatedThenUseNotifyEnableFlagIsNotSet) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableUserFenceForCompletionWait.set(1);
|
||||
DebugManager.flags.OverrideNotifyEnableForTagUpdatePostSync.set(0);
|
||||
|
||||
mock->isVmBindAvailableCall.callParent = false;
|
||||
mock->isVmBindAvailableCall.returnValue = true;
|
||||
|
||||
std::unique_ptr<TestedDrmCommandStreamReceiver<FamilyType>> testedCsr =
|
||||
std::make_unique<TestedDrmCommandStreamReceiver<FamilyType>>(gemCloseWorkerMode::gemCloseWorkerInactive,
|
||||
*this->executionEnvironment,
|
||||
1);
|
||||
|
||||
EXPECT_TRUE(testedCsr->useUserFenceWait);
|
||||
EXPECT_FALSE(testedCsr->isUsedNotifyEnableForPostSync());
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenVmBindNotAvailableWhenCheckingForKmdWaitModeActiveThenReturnTrue) {
|
||||
auto testDrmCsr = static_cast<TestedDrmCommandStreamReceiver<FamilyType> *>(csr);
|
||||
mock->isVmBindAvailableCall.called = 0u;
|
||||
|
|
|
@ -251,3 +251,4 @@ UseUmKmDataTranslator = 0
|
|||
EnableUserFenceForCompletionWait = -1
|
||||
EnableUserFenceUseCtxId = -1
|
||||
SetKmdWaitTimeout = -1
|
||||
OverrideNotifyEnableForTagUpdatePostSync = -1
|
||||
|
|
|
@ -234,6 +234,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, AlignLocalMemoryVaTo2MB, -1, "Allow 2MB pages fo
|
|||
DECLARE_DEBUG_VARIABLE(int32_t, EnableUserFenceForCompletionWait, -1, "-1: default (disabled), 0: disable, 1: enable : Use Wait User Fence instead Gem Wait")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableUserFenceUseCtxId, -1, "-1: default (enabled), 0: disable, 1: enable : Use Context Id in Wait User Fence when waiting for completion tag")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, SetKmdWaitTimeout, -1, "-1: default (infinity), >0: amount of time units for wait function timeout")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideNotifyEnableForTagUpdatePostSync, -1, "-1: default (usage determined by user fence wait call), 0: disable use of NotifyEnable flag, 1: enable use NotifyEnable flag")
|
||||
|
||||
/*EXPERIMENTAL TOGGLES*/
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ExperimentalEnableCustomLocalMemoryAlignment, 0, "Align local memory allocations to a given value. Works only with allocations at least as big as the value. 0: no effect, 2097152: 2 megabytes, 1073741824: 1 gigabyte")
|
||||
|
|
Loading…
Reference in New Issue