fix: disable fence wait if not supported on given CSR type

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-12-02 14:34:42 +00:00
committed by Compute-Runtime-Automation
parent d8a4f92856
commit 9629ab3cc3
7 changed files with 13 additions and 3 deletions

View File

@@ -530,6 +530,8 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
return BaseClass::waitUserFence(waitValue, hostAddress, timeout, userInterrupt, externalInterruptId, allocForInterruptWait);
}
bool waitUserFenceSupported() override { return isUserFenceWaitSupported; }
void unblockPagingFenceSemaphore(uint64_t pagingFenceValue) override {
this->pagingFenceValueToUnblock = pagingFenceValue;
BaseClass::unblockPagingFenceSemaphore(pagingFenceValue);
@@ -619,6 +621,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
bool stopDirectSubmissionCalled = false;
bool stopDirectSubmissionCalledBlocking = false;
bool registeredDcFlushForDcFlushMitigation = false;
bool isUserFenceWaitSupported = false;
};
} // namespace NEO

View File

@@ -121,6 +121,7 @@ TEST_F(CommandStreamReceiverTest, givenCsrWhenGettingCompletionAddressThenUnderl
TEST_F(CommandStreamReceiverTest, givenBaseCsrWhenCallingWaitUserFenceThenReturnFalse) {
EXPECT_FALSE(commandStreamReceiver->waitUserFence(1, commandStreamReceiver->getCompletionAddress(), -1, false, InterruptId::notUsed, nullptr));
EXPECT_FALSE(commandStreamReceiver->waitUserFenceSupported());
}
HWTEST_F(CommandStreamReceiverTest, WhenCreatingCsrThenDefaultValuesAreSet) {

View File

@@ -233,6 +233,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTestDrmPrelim, givenExternalInterrupt
testDrmCsr->useUserFenceWait = true;
testDrmCsr->activePartitions = 2u;
EXPECT_NE(0u, testDrmCsr->immWritePostSyncWriteOffset);
EXPECT_TRUE(testDrmCsr->waitUserFenceSupported());
auto rootExecEnvironment = executionEnvironment->rootDeviceEnvironments[0].get();
auto &gfxCoreHelper = rootExecEnvironment->getHelper<GfxCoreHelper>();