fix: use correct mutex order in enqueueBlit

Related-To: NEO-15740
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2025-09-09 12:54:49 +00:00
committed by Compute-Runtime-Automation
parent 1d2ba692de
commit 447c5cc56c

View File

@@ -1406,8 +1406,12 @@ cl_int CommandQueueHw<GfxFamily>::enqueueBlit(const MultiDispatchInfo &multiDisp
bcsCsr.ensurePrimaryCsrInitialized(this->device->getDevice());
}
TakeOwnershipWrapper<CommandQueueHw<GfxFamily>> queueOwnership(*this);
auto bcsCommandStreamReceiverOwnership = bcsCsr.obtainUniqueOwnership();
std::unique_lock<NEO::CommandStreamReceiver::MutexType> commandStreamReceiverOwnership;
if (debugManager.flags.ForceCsrLockInBcsEnqueueOnlyForGpgpuSubmission.get() != 1) {
commandStreamReceiverOwnership = getGpgpuCommandStreamReceiver().obtainUniqueOwnership();
}
registerBcsCsrClient(bcsCsr);
@@ -1427,10 +1431,6 @@ cl_int CommandQueueHw<GfxFamily>::enqueueBlit(const MultiDispatchInfo &multiDisp
const bool profilingEnabled = isProfilingEnabled() && pEventBuilder->getEvent();
std::unique_ptr<KernelOperation> blockedCommandsData;
TakeOwnershipWrapper<CommandQueueHw<GfxFamily>> queueOwnership(*this);
if (debugManager.flags.ForceCsrLockInBcsEnqueueOnlyForGpgpuSubmission.get() != 1) {
commandStreamReceiverOwnership = getGpgpuCommandStreamReceiver().obtainUniqueOwnership();
}
auto blockQueue = false;
bool migratedMemory = false;