mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 05:56:36 +08:00
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:
committed by
Compute-Runtime-Automation
parent
9f5b3efa73
commit
f6efba9a26
@@ -32,7 +32,6 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
|
|||||||
using BaseClass::requiredScratchSize;
|
using BaseClass::requiredScratchSize;
|
||||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAddress;
|
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAddress;
|
||||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAllocation;
|
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAllocation;
|
||||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::latestSentTaskCount;
|
|
||||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::taskCount;
|
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::taskCount;
|
||||||
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::useNotifyEnableForPostSync;
|
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::useNotifyEnableForPostSync;
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ bool DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Reside
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isUserFenceWaitActive()) {
|
if (isUserFenceWaitActive()) {
|
||||||
this->flushStamp->setStamp(latestSentTaskCount);
|
this->flushStamp->setStamp(taskCount);
|
||||||
} else {
|
} else {
|
||||||
this->flushStamp->setStamp(bb->peekHandle());
|
this->flushStamp->setStamp(bb->peekHandle());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using CommandStreamReceiverFlushTaskTests = UltCommandStreamReceiverTest;
|
typedef UltCommandStreamReceiverTest CommandStreamReceiverFlushTaskTests;
|
||||||
|
|
||||||
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelNotRequiringDCFlushWhenUnblockedThenDCFlushIsNotAdded) {
|
HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenBlockedKernelNotRequiringDCFlushWhenUnblockedThenDCFlushIsNotAdded) {
|
||||||
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
|
||||||
@@ -491,12 +491,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCommandStreamReceiverWhenFenc
|
|||||||
EXPECT_FALSE(csr.isMadeResident(csr.globalFenceAllocation));
|
EXPECT_FALSE(csr.isMadeResident(csr.globalFenceAllocation));
|
||||||
EXPECT_FALSE(csr.isMadeNonResident(csr.globalFenceAllocation));
|
EXPECT_FALSE(csr.isMadeNonResident(csr.globalFenceAllocation));
|
||||||
|
|
||||||
csr.taskCount = 2u;
|
|
||||||
flushSmallTask(csr);
|
flushSmallTask(csr);
|
||||||
|
|
||||||
EXPECT_EQ(3u, csr.latestSentTaskCount);
|
|
||||||
EXPECT_EQ(3u, csr.latestFlushedTaskCount);
|
|
||||||
|
|
||||||
EXPECT_TRUE(csr.isMadeResident(csr.globalFenceAllocation));
|
EXPECT_TRUE(csr.isMadeResident(csr.globalFenceAllocation));
|
||||||
EXPECT_TRUE(csr.isMadeNonResident(csr.globalFenceAllocation));
|
EXPECT_TRUE(csr.isMadeNonResident(csr.globalFenceAllocation));
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ class TestedDrmCommandStreamReceiver : public DrmCommandStreamReceiver<GfxFamily
|
|||||||
using CommandStreamReceiver::flushStamp;
|
using CommandStreamReceiver::flushStamp;
|
||||||
using CommandStreamReceiver::getTagAddress;
|
using CommandStreamReceiver::getTagAddress;
|
||||||
using CommandStreamReceiver::globalFenceAllocation;
|
using CommandStreamReceiver::globalFenceAllocation;
|
||||||
using CommandStreamReceiver::latestSentTaskCount;
|
|
||||||
using CommandStreamReceiver::makeResident;
|
using CommandStreamReceiver::makeResident;
|
||||||
using CommandStreamReceiver::taskCount;
|
using CommandStreamReceiver::taskCount;
|
||||||
using CommandStreamReceiver::useGpuIdleImplicitFlush;
|
using CommandStreamReceiver::useGpuIdleImplicitFlush;
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
|||||||
return this->tagAllocation;
|
return this->tagAllocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setLatestSentTaskCount(uint32_t latestSentTaskCount) {
|
||||||
|
this->latestSentTaskCount = latestSentTaskCount;
|
||||||
|
}
|
||||||
|
|
||||||
bool flushBatchedSubmissions() override {
|
bool flushBatchedSubmissions() override {
|
||||||
flushBatchedSubmissionsCalled = true;
|
flushBatchedSubmissionsCalled = true;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -789,7 +789,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest, givenAllocationWithSingleBuffer
|
|||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
||||||
givenWaitUserFenceFlagAndVmBindAvailableSetWhenDrmCsrFlushedThenExpectLatestSentTaskCountStoredAsFlushStamp) {
|
givenWaitUserFenceFlagAndVmBindAvailableSetWhenDrmCsrFlushedThenExpectTaskCountStoredAsFlushStamp) {
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
DebugManager.flags.EnableUserFenceForCompletionWait.set(1);
|
DebugManager.flags.EnableUserFenceForCompletionWait.set(1);
|
||||||
|
|
||||||
@@ -811,7 +811,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
|||||||
CommandStreamReceiverHw<FamilyType>::alignToCacheLine(cs);
|
CommandStreamReceiverHw<FamilyType>::alignToCacheLine(cs);
|
||||||
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr, false};
|
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());
|
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
|
||||||
|
|
||||||
EXPECT_EQ(160u, testedCsr->flushStamp->peekStamp());
|
EXPECT_EQ(160u, testedCsr->flushStamp->peekStamp());
|
||||||
@@ -841,7 +841,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
|||||||
|
|
||||||
DrmAllocation *alloc = static_cast<DrmAllocation *>(cs.getGraphicsAllocation());
|
DrmAllocation *alloc = static_cast<DrmAllocation *>(cs.getGraphicsAllocation());
|
||||||
auto boHandle = static_cast<FlushStamp>(alloc->getBO()->peekHandle());
|
auto boHandle = static_cast<FlushStamp>(alloc->getBO()->peekHandle());
|
||||||
testedCsr->latestSentTaskCount = 160u;
|
testedCsr->taskCount = 160u;
|
||||||
|
|
||||||
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
|
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
|
||||||
|
|
||||||
@@ -875,7 +875,7 @@ HWTEST_TEMPLATED_F(DrmCommandStreamEnhancedTest,
|
|||||||
|
|
||||||
DrmAllocation *alloc = static_cast<DrmAllocation *>(cs.getGraphicsAllocation());
|
DrmAllocation *alloc = static_cast<DrmAllocation *>(cs.getGraphicsAllocation());
|
||||||
auto boHandle = static_cast<FlushStamp>(alloc->getBO()->peekHandle());
|
auto boHandle = static_cast<FlushStamp>(alloc->getBO()->peekHandle());
|
||||||
testedCsr->latestSentTaskCount = 160u;
|
testedCsr->taskCount = 160u;
|
||||||
|
|
||||||
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
|
testedCsr->flush(batchBuffer, testedCsr->getResidencyAllocations());
|
||||||
|
|
||||||
|
|||||||
@@ -1199,6 +1199,8 @@ void CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
|
|||||||
|
|
||||||
this->flushSmallTask(commandStream, commandStreamStart);
|
this->flushSmallTask(commandStream, commandStreamStart);
|
||||||
|
|
||||||
|
this->latestFlushedTaskCount = taskCount + 1;
|
||||||
|
this->latestSentTaskCount = taskCount + 1;
|
||||||
taskCount++;
|
taskCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1289,9 +1291,6 @@ void CommandStreamReceiverHw<GfxFamily>::flushSmallTask(LinearStream &commandStr
|
|||||||
makeResident(*globalFenceAllocation);
|
makeResident(*globalFenceAllocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->latestFlushedTaskCount = taskCount + 1;
|
|
||||||
this->latestSentTaskCount = taskCount + 1;
|
|
||||||
|
|
||||||
BatchBuffer batchBuffer{commandStreamTask.getGraphicsAllocation(), commandStreamStartTask, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount,
|
BatchBuffer batchBuffer{commandStreamTask.getGraphicsAllocation(), commandStreamStartTask, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount,
|
||||||
commandStreamTask.getUsed(), &commandStreamTask, endingCmdPtr, false};
|
commandStreamTask.getUsed(), &commandStreamTask, endingCmdPtr, false};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user