diff --git a/opencl/source/os_interface/linux/drm_command_stream.inl b/opencl/source/os_interface/linux/drm_command_stream.inl index 51a6be6dc0..50462bb723 100644 --- a/opencl/source/os_interface/linux/drm_command_stream.inl +++ b/opencl/source/os_interface/linux/drm_command_stream.inl @@ -69,8 +69,6 @@ bool DrmCommandStreamReceiver::flush(BatchBuffer &batchBuffer, Reside this->printDeviceIndex(); DrmAllocation *alloc = static_cast(batchBuffer.commandBufferAllocation); DEBUG_BREAK_IF(!alloc); - alloc->updateTaskCount(this->taskCount + 1, this->osContext->getContextId()); - alloc->updateResidencyTaskCount(this->taskCount + 1, this->osContext->getContextId()); BufferObject *bb = alloc->getBO(); if (bb == nullptr) { diff --git a/shared/source/command_stream/command_stream_receiver_hw_base.inl b/shared/source/command_stream/command_stream_receiver_hw_base.inl index ca743a3c7f..a83d3f6a97 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -568,6 +568,8 @@ CompletionStamp CommandStreamReceiverHw::flushTask( BatchBuffer batchBuffer{streamToSubmit.getGraphicsAllocation(), startOffset, chainedBatchBufferStartOffset, chainedBatchBuffer, dispatchFlags.requiresCoherency, dispatchFlags.lowPriority, dispatchFlags.throttle, dispatchFlags.sliceCount, streamToSubmit.getUsed(), &streamToSubmit, bbEndLocation, dispatchFlags.useSingleSubdevice}; + streamToSubmit.getGraphicsAllocation()->updateTaskCount(this->taskCount + 1, this->osContext->getContextId()); + streamToSubmit.getGraphicsAllocation()->updateResidencyTaskCount(this->taskCount + 1, this->osContext->getContextId()); if (submitCSR | submitTask) { if (this->dispatchMode == DispatchMode::ImmediateDispatch) {