Add notify parameter to direct submission post sync operations

Related-To: NEO-5845

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-12-22 19:28:02 +00:00
committed by Compute-Runtime-Automation
parent 732fbe5c7f
commit b6da6471f2
13 changed files with 164 additions and 56 deletions

View File

@@ -59,7 +59,7 @@ class DirectSubmissionHw {
virtual ~DirectSubmissionHw();
bool initialize(bool submitOnInit);
bool initialize(bool submitOnInit, bool useNotify);
MOCKABLE_VIRTUAL bool stopRingBuffer();
@@ -160,5 +160,6 @@ class DirectSubmissionHw {
bool disableMonitorFence = false;
bool partitionedMode = false;
bool partitionConfigSet = true;
bool useNotifyForPostSync = false;
};
} // namespace NEO

View File

@@ -154,7 +154,8 @@ inline void DirectSubmissionHw<GfxFamily, Dispatcher>::cpuCachelineFlush(void *p
}
template <typename GfxFamily, typename Dispatcher>
bool DirectSubmissionHw<GfxFamily, Dispatcher>::initialize(bool submitOnInit) {
bool DirectSubmissionHw<GfxFamily, Dispatcher>::initialize(bool submitOnInit, bool useNotify) {
useNotifyForPostSync = useNotify;
bool ret = allocateResources();
initDiagnostic(submitOnInit);
@@ -222,7 +223,7 @@ bool DirectSubmissionHw<GfxFamily, Dispatcher>::stopRingBuffer() {
if (disableMonitorFence) {
TagData currentTagData = {};
getTagAddressValue(currentTagData);
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, *hwInfo, false, this->partitionedMode);
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, *hwInfo, this->useNotifyForPostSync, this->partitionedMode);
}
Dispatcher::dispatchStopCommandBuffer(ringCommandStream);
@@ -277,7 +278,7 @@ inline void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchSwitchRingBufferS
if (disableMonitorFence) {
TagData currentTagData = {};
getTagAddressValue(currentTagData);
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, *hwInfo, false, this->partitionedMode);
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, *hwInfo, this->useNotifyForPostSync, this->partitionedMode);
}
Dispatcher::dispatchStartCommandBuffer(ringCommandStream, nextBufferGpuAddress);
}
@@ -375,7 +376,7 @@ void *DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchWorkloadSection(BatchBu
if (!disableMonitorFence) {
TagData currentTagData = {};
getTagAddressValue(currentTagData);
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, *hwInfo, false, this->partitionedMode);
Dispatcher::dispatchMonitorFence(ringCommandStream, currentTagData.tagAddress, currentTagData.tagValue, *hwInfo, this->useNotifyForPostSync, this->partitionedMode);
}
dispatchSemaphoreSection(currentQueueWorkCount + 1);

View File

@@ -35,6 +35,7 @@ inline void RenderDispatcher<GfxFamily>::dispatchMonitorFence(LinearStream &cmdB
PipeControlArgs args;
args.dcFlushEnable = MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
args.workloadPartitionOffset = partitionedWorkload;
args.notifyEnable = useNotifyEnable;
MemorySynchronizationCommands<GfxFamily>::addPipeControlAndProgramPostSyncOperation(
cmdBuffer,
POST_SYNC_OPERATION::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,