Skip to content

Commit 269b49a

Browse files
Stop using context for wait user fence function
Signed-off-by: Zbigniew Zdanowicz <[email protected]>
1 parent f0ba132 commit 269b49a

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

opencl/source/os_interface/linux/drm_command_stream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
7777
int32_t kmdWaitTimeout = -1;
7878

7979
bool useUserFenceWait = true;
80-
bool useContextForUserFenceWait = true;
80+
bool useContextForUserFenceWait = false;
8181
};
8282
} // namespace NEO

opencl/test/unit_test/os_interface/linux/drm_command_stream_tests_2.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenWaitUserFenceFlagNotSetWhe
897897
1);
898898
EXPECT_FALSE(testedCsr->useUserFenceWait);
899899
EXPECT_FALSE(testedCsr->isUsedNotifyEnableForPostSync());
900-
EXPECT_TRUE(testedCsr->useContextForUserFenceWait);
900+
EXPECT_FALSE(testedCsr->useContextForUserFenceWait);
901901
device->resetCommandStreamReceiver(testedCsr);
902902
mock->ioctl_cnt.gemWait = 0;
903903

@@ -920,7 +920,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenGemWaitUsedWhenKmdTimeoutU
920920
1);
921921
EXPECT_FALSE(testedCsr->useUserFenceWait);
922922
EXPECT_FALSE(testedCsr->isUsedNotifyEnableForPostSync());
923-
EXPECT_TRUE(testedCsr->useContextForUserFenceWait);
923+
EXPECT_FALSE(testedCsr->useContextForUserFenceWait);
924924
device->resetCommandStreamReceiver(testedCsr);
925925
mock->ioctl_cnt.gemWait = 0;
926926

@@ -933,9 +933,10 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenGemWaitUsedWhenKmdTimeoutU
933933
}
934934

935935
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
936-
givenWaitUserFenceFlagSetAndVmBindAvailableWhenDrmCsrWaitsForFlushStampThenExpectUseDrmWaitUserFenceCallWithNonZeroContext) {
936+
givenWaitUserFenceFlagSetAndVmBindAvailableAndUseDrmCtxWhenDrmCsrWaitsForFlushStampThenExpectUseDrmWaitUserFenceCallWithNonZeroContext) {
937937
DebugManagerStateRestore restorer;
938938
DebugManager.flags.EnableUserFenceForCompletionWait.set(1);
939+
DebugManager.flags.EnableUserFenceUseCtxId.set(1);
939940

940941
mock->isVmBindAvailableCall.callParent = false;
941942
mock->isVmBindAvailableCall.returnValue = true;
@@ -987,7 +988,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
987988
1);
988989
EXPECT_TRUE(testedCsr->useUserFenceWait);
989990
EXPECT_TRUE(testedCsr->isUsedNotifyEnableForPostSync());
990-
EXPECT_TRUE(testedCsr->useContextForUserFenceWait);
991+
EXPECT_FALSE(testedCsr->useContextForUserFenceWait);
991992
device->resetCommandStreamReceiver(testedCsr);
992993
mock->ioctl_cnt.gemWait = 0;
993994
mock->isVmBindAvailableCall.called = 0u;
@@ -1016,7 +1017,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
10161017
1);
10171018
EXPECT_FALSE(testedCsr->useUserFenceWait);
10181019
EXPECT_FALSE(testedCsr->isUsedNotifyEnableForPostSync());
1019-
EXPECT_TRUE(testedCsr->useContextForUserFenceWait);
1020+
EXPECT_FALSE(testedCsr->useContextForUserFenceWait);
10201021
device->resetCommandStreamReceiver(testedCsr);
10211022
mock->ioctl_cnt.gemWait = 0;
10221023
mock->isVmBindAvailableCall.called = 0u;

shared/source/debug_settings/debug_variables_base.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, WaitLoopCount, -1, "-1: use default, >=0: number
297297
DECLARE_DEBUG_VARIABLE(int32_t, GTPinAllocateBufferInSharedMemory, -1, "Force GTPin to allocate buffer in shared memory")
298298
DECLARE_DEBUG_VARIABLE(int32_t, AlignLocalMemoryVaTo2MB, -1, "Allow 2MB pages for allocations with size>=2MB. On Linux it means aligned VA, on Windows it means aligned size. -1: default, 0: disabled, 1: enabled")
299299
DECLARE_DEBUG_VARIABLE(int32_t, EnableUserFenceForCompletionWait, -1, "-1: default (disabled), 0: disable, 1: enable : Use Wait User Fence instead Gem Wait")
300-
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")
300+
DECLARE_DEBUG_VARIABLE(int32_t, EnableUserFenceUseCtxId, -1, "-1: default (disabled), 0: disable, 1: enable : Use Context Id in Wait User Fence when waiting for completion tag")
301301
DECLARE_DEBUG_VARIABLE(int32_t, SetKmdWaitTimeout, -1, "-1: default (infinity), >0: amount of time units for wait function timeout")
302302
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")
303303
DECLARE_DEBUG_VARIABLE(int32_t, Force32BitDriverSupport, -1, "-1: default, 0: disable, 1: enable, Forces the driver to support 32 bit.")

0 commit comments

Comments
 (0)