Lock csr inside executeCommandLists() to make submissions thread safe

Change-Id: I9326ee5bb835f01015668e66d2582df9ed02d66f
This commit is contained in:
Vinod Tipparaju
2020-07-17 22:03:16 +05:30
committed by sys_ocldev
parent 5dbf7d5f8c
commit bf57f2d696
3 changed files with 6 additions and 4 deletions

View File

@@ -266,7 +266,7 @@ class CommandStreamReceiver {
uint64_t totalMemoryUsed = 0u;
// taskCount - # of tasks submitted
uint32_t taskCount = 0;
std::atomic<uint32_t> taskCount{0};
uint32_t lastSentL3Config = 0;
uint32_t latestSentStatelessMocsConfig = 0;

View File

@@ -224,7 +224,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
args);
this->latestSentTaskCount = taskCount + 1;
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskCount", taskCount);
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskCount", peekTaskCount());
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
flatBatchBufferHelper->setPatchInfoData(PatchInfoData(address, 0u,
PatchInfoAllocationType::TagAddress,
@@ -421,7 +421,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
MemorySynchronizationCommands<GfxFamily>::addPipeControl(commandStreamCSR, args);
}
this->taskLevel = taskLevel;
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "this->taskCount", this->taskCount);
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "this->taskCount", peekTaskCount());
}
if (DebugManager.flags.ForcePipeControlPriorToWalker.get()) {
@@ -545,7 +545,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
}
++taskCount;
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskCount", taskCount);
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskCount", peekTaskCount());
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "Current taskCount:", tagAddress ? *tagAddress : 0);
CompletionStamp completionStamp = {