Revert "Use latest sent task count for Linux flush stamp"
This reverts commit 566415a1f5
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
9f5b3efa73
commit
f6efba9a26
|
@ -32,7 +32,6 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
|
|||
using BaseClass::requiredScratchSize;
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAddress;
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAllocation;
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::latestSentTaskCount;
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::taskCount;
|
||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::useNotifyEnableForPostSync;
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ bool DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Reside
|
|||
}
|
||||
|
||||
if (isUserFenceWaitActive()) {
|
||||
this->flushStamp->setStamp(latestSentTaskCount);
|
||||
this->flushStamp->setStamp(taskCount);
|
||||
} else {
|
||||
this->flushStamp->setStamp(bb->peekHandle());
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
using namespace NEO;
|
||||
|
||||
using CommandStreamReceiverFlushTaskTests = UltCommandStreamReceiverTest;
|
||||
typedef UltCommandStreamReceiverTest CommandStreamReceiverFlushTaskTests;
|
||||
|
||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelNotRequiringDCFlushWhenUnblockedThenDCFlushIsNotAdded) {
|
||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
@ -491,12 +491,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandStreamReceiverWhenFenc
|
|||
EXPECT_FALSE(csr.isMadeResident(csr.globalFenceAllocation));
|
||||
EXPECT_FALSE(csr.isMadeNonResident(csr.globalFenceAllocation));
|
||||
|
||||
csr.taskCount = 2u;
|
||||
flushSmallTask(csr);
|
||||
|
||||
EXPECT_EQ(3u, csr.latestSentTaskCount);
|
||||
EXPECT_EQ(3u, csr.latestFlushedTaskCount);
|
||||
|
||||
EXPECT_TRUE(csr.isMadeResident(csr.globalFenceAllocation));
|
||||
EXPECT_TRUE(csr.isMadeNonResident(csr.globalFenceAllocation));
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ class TestedDrmCommandStreamReceiver : public DrmCommandStreamReceiver<GfxFamily
|
|||
using CommandStreamReceiver::flushStamp;
|
||||
using CommandStreamReceiver::getTagAddress;
|
||||
using CommandStreamReceiver::globalFenceAllocation;
|
||||
using CommandStreamReceiver::latestSentTaskCount;
|
||||
using CommandStreamReceiver::makeResident;
|
||||
using CommandStreamReceiver::taskCount;
|
||||
using CommandStreamReceiver::useGpuIdleImplicitFlush;
|
||||
|
|
|
@ -78,6 +78,10 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
|||
return this->tagAllocation;
|
||||
}
|
||||
|
||||
void setLatestSentTaskCount(uint32_t latestSentTaskCount) {
|
||||
this->latestSentTaskCount = latestSentTaskCount;
|
||||
}
|
||||
|
||||
bool flushBatchedSubmissions() override {
|
||||
flushBatchedSubmissionsCalled = true;
|
||||
return true;
|
||||
|
|
|
@ -789,7 +789,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenAllocationWithSingleBuffer
|
|||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
||||
givenWaitUserFenceFlagAndVmBindAvailableSetWhenDrmCsrFlushedThenExpectLatestSentTaskCountStoredAsFlushStamp) {
|
||||
givenWaitUserFenceFlagAndVmBindAvailableSetWhenDrmCsrFlushedThenExpectTaskCountStoredAsFlushStamp) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableUserFenceForCompletionWait.set(1);
|
||||
|
||||
|
@ -811,7 +811,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
|||
CommandStreamReceiverHw<FamilyType>::alignToCacheLine(cs);
|
||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
|
||||
|
||||
testedCsr->latestSentTaskCount = 160u;
|
||||
testedCsr->taskCount = 160u;
|
||||
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
|
||||
|
||||
EXPECT_EQ(160u, testedCsr->flushStamp->peekStamp());
|
||||
|
@ -841,7 +841,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
|||
|
||||
DrmAllocation *alloc = static_cast<DrmAllocation *>(cs.getGraphicsAllocation());
|
||||
auto boHandle = static_cast<FlushStamp>(alloc->getBO()->peekHandle());
|
||||
testedCsr->latestSentTaskCount = 160u;
|
||||
testedCsr->taskCount = 160u;
|
||||
|
||||
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
|
||||
|
||||
|
@ -875,7 +875,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
|||
|
||||
DrmAllocation *alloc = static_cast<DrmAllocation *>(cs.getGraphicsAllocation());
|
||||
auto boHandle = static_cast<FlushStamp>(alloc->getBO()->peekHandle());
|
||||
testedCsr->latestSentTaskCount = 160u;
|
||||
testedCsr->taskCount = 160u;
|
||||
|
||||
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
|
||||
|
||||
|
|
|
@ -1199,6 +1199,8 @@ void CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
|
|||
|
||||
this->flushSmallTask(commandStream, commandStreamStart);
|
||||
|
||||
this->latestFlushedTaskCount = taskCount + 1;
|
||||
this->latestSentTaskCount = taskCount + 1;
|
||||
taskCount++;
|
||||
}
|
||||
|
||||
|
@ -1289,9 +1291,6 @@ void CommandStreamReceiverHw<GfxFamily>::flushSmallTask(LinearStream &commandStr
|
|||
makeResident(*globalFenceAllocation);
|
||||
}
|
||||
|
||||
this->latestFlushedTaskCount = taskCount + 1;
|
||||
this->latestSentTaskCount = taskCount + 1;
|
||||
|
||||
BatchBuffer batchBuffer{commandStreamTask.getGraphicsAllocation(), commandStreamStartTask, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount,
|
||||
commandStreamTask.getUsed(), &commandStreamTask, endingCmdPtr, false};
|
||||
|
||||
|
|
Loading…
Reference in New Issue