Initial EXEC_OBJECT_ASYNC support

Change-Id: I68894fa403ed8adc432afcd1119ea7eb88093a11
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-05-21 12:21:13 +02:00
committed by sys_ocldev
parent 41fef1c71e
commit 28bc761607
4 changed files with 36 additions and 2 deletions

View File

@@ -747,6 +747,35 @@ HWTEST_TEMPLATED_F(DrmCommandStreamBatchingTests, givenCSRWhenFlushIsCalledThenP
mm->freeGraphicsMemory(commandBuffer);
}
HWTEST_TEMPLATED_F(DrmCommandStreamBatchingTests, givenDebugFlagSetWhenCallingExecIoctlThenPassAsyncFlag) {
DebugManagerStateRestore restore;
auto commandBuffer = mm->allocateGraphicsMemoryWithProperties(MockAllocationProperties{csr->getRootDeviceIndex(), MemoryConstants::pageSize});
LinearStream cs(commandBuffer);
CommandStreamReceiverHw<FamilyType>::addBatchBufferEnd(cs, nullptr);
CommandStreamReceiverHw<FamilyType>::alignToCacheLine(cs);
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, QueueSliceCount::defaultSliceCount, cs.getUsed(), &cs, nullptr};
uint64_t baseFlags = static_cast<OsContextLinux &>(csr->getOsContext()).getEngineFlag() | I915_EXEC_NO_RELOC;
{
DebugManager.flags.UseAsyncDrmExec.set(0);
csr->flush(batchBuffer, csr->getResidencyAllocations());
EXPECT_EQ(baseFlags, this->mock->execBuffer.flags);
}
{
DebugManager.flags.UseAsyncDrmExec.set(1);
csr->flush(batchBuffer, csr->getResidencyAllocations());
EXPECT_EQ((baseFlags | EXEC_OBJECT_ASYNC), this->mock->execBuffer.flags);
}
mm->freeGraphicsMemory(commandBuffer);
}
HWTEST_TEMPLATED_F(DrmCommandStreamBatchingTests, givenCsrWhenDispatchPolicyIsSetToBatchingThenCommandBufferIsNotSubmitted) {
mock->reset();
csr->overrideDispatchPolicy(DispatchMode::BatchedDispatch);

View File

@@ -161,3 +161,4 @@ LimitBlitterMaxHeight = -1
FlushAfterEachBlit = -1
UseCommandBufferHeaderSizeForWddmQueueSubmission = 0
OverridePreemptionSurfaceSizeInMb = -1
UseAsyncDrmExec = -1