Return submission status from flushTagUpdate method

Related-To: NEO-7412
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-11-09 11:18:06 +00:00
committed by Compute-Runtime-Automation
parent 6b64c1b04b
commit 57cea7365e
13 changed files with 65 additions and 27 deletions

View File

@@ -233,7 +233,7 @@ class CommandStreamReceiver {
virtual uint32_t flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) = 0;
virtual void flushTagUpdate() = 0;
virtual SubmissionStatus flushTagUpdate() = 0;
virtual void updateTagFromWait() = 0;
virtual bool isUpdateTagFromWaitEnabled() = 0;

View File

@@ -99,11 +99,11 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
uint32_t flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override;
void flushTagUpdate() override;
void flushMiFlushDW();
void flushPipeControl();
void flushSmallTask(LinearStream &commandStreamTask,
size_t commandStreamStartTask);
SubmissionStatus flushTagUpdate() override;
SubmissionStatus flushMiFlushDW();
SubmissionStatus flushPipeControl();
SubmissionStatus flushSmallTask(LinearStream &commandStreamTask,
size_t commandStreamStartTask);
SubmissionStatus flushHandler(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency);
bool isUpdateTagFromWaitEnabled() override;

View File

@@ -1195,18 +1195,19 @@ uint32_t CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropertiesCo
}
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::flushTagUpdate() {
inline SubmissionStatus CommandStreamReceiverHw<GfxFamily>::flushTagUpdate() {
if (this->osContext != nullptr) {
if (EngineHelpers::isBcs(this->osContext->getEngineType())) {
this->flushMiFlushDW();
return this->flushMiFlushDW();
} else {
this->flushPipeControl();
return this->flushPipeControl();
}
}
return SubmissionStatus::DEVICE_UNINITIALIZED;
}
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::flushMiFlushDW() {
inline SubmissionStatus CommandStreamReceiverHw<GfxFamily>::flushMiFlushDW() {
auto lock = obtainUniqueOwnership();
auto &commandStream = getCS(EncodeMiFlushDW<GfxFamily>::getMiFlushDwCmdSizeForDataWrite());
@@ -1220,12 +1221,13 @@ inline void CommandStreamReceiverHw<GfxFamily>::flushMiFlushDW() {
makeResident(*tagAllocation);
this->flushSmallTask(commandStream, commandStreamStart);
auto submissionStatus = this->flushSmallTask(commandStream, commandStreamStart);
this->latestFlushedTaskCount = taskCount.load();
return submissionStatus;
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
SubmissionStatus CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
auto lock = obtainUniqueOwnership();
const auto &hwInfo = peekHwInfo();
@@ -1247,12 +1249,13 @@ void CommandStreamReceiverHw<GfxFamily>::flushPipeControl() {
makeResident(*tagAllocation);
this->flushSmallTask(commandStream, commandStreamStart);
auto submissionStatus = this->flushSmallTask(commandStream, commandStreamStart);
this->latestFlushedTaskCount = taskCount.load();
return submissionStatus;
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::flushSmallTask(LinearStream &commandStreamTask, size_t commandStreamStartTask) {
SubmissionStatus CommandStreamReceiverHw<GfxFamily>::flushSmallTask(LinearStream &commandStreamTask, size_t commandStreamStartTask) {
using MI_BATCH_BUFFER_START = typename GfxFamily::MI_BATCH_BUFFER_START;
using MI_BATCH_BUFFER_END = typename GfxFamily::MI_BATCH_BUFFER_END;
@@ -1272,8 +1275,9 @@ void CommandStreamReceiverHw<GfxFamily>::flushSmallTask(LinearStream &commandStr
commandStreamTask.getUsed(), &commandStreamTask, endingCmdPtr, false};
this->latestSentTaskCount = taskCount + 1;
flushHandler(batchBuffer, getResidencyAllocations());
auto submissionStatus = flushHandler(batchBuffer, getResidencyAllocations());
taskCount++;
return submissionStatus;
}
template <typename GfxFamily>