Lock exec path if default memory operations handler is used

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2020-11-27 12:02:43 +00:00
committed by Compute-Runtime-Automation
parent 6e805b4fde
commit 0829e4484e
7 changed files with 43 additions and 11 deletions

View File

@@ -73,7 +73,11 @@ bool DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Reside
auto memoryOperationsInterface = static_cast<DrmMemoryOperationsHandler *>(this->executionEnvironment.rootDeviceEnvironments[this->rootDeviceIndex]->memoryOperationsInterface.get());
auto lock = memoryOperationsInterface->lockHandlerForExecWA();
std::unique_lock<std::mutex> lock;
if (!this->directSubmission.get() && !this->blitterDirectSubmission.get()) {
lock = memoryOperationsInterface->lockHandlerIfUsed();
}
memoryOperationsInterface->mergeWithResidencyContainer(this->osContext, allocationsForResidency);
if (this->directSubmission.get()) {