mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add alternative residency model on Linux
Related-To: NEO-4732 Change-Id: I79e165d2b647af200ca314e1183ecf05903de644 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
@@ -69,12 +69,8 @@ bool DrmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer, Reside
|
||||
|
||||
auto memoryOperationsInterface = static_cast<DrmMemoryOperationsHandler *>(this->executionEnvironment.rootDeviceEnvironments[this->rootDeviceIndex]->memoryOperationsInterface.get());
|
||||
|
||||
std::unique_lock<std::mutex> lock;
|
||||
if (DebugManager.flags.MakeAllBuffersResident.get()) {
|
||||
lock = memoryOperationsInterface->acquireLock();
|
||||
}
|
||||
|
||||
memoryOperationsInterface->mergeWithResidencyContainer(allocationsForResidency);
|
||||
auto lock = memoryOperationsInterface->lockHandlerForExecWA();
|
||||
memoryOperationsInterface->mergeWithResidencyContainer(this->osContext, allocationsForResidency);
|
||||
|
||||
this->flushStamp->setStamp(bb->peekHandle());
|
||||
this->flushInternal(batchBuffer, allocationsForResidency);
|
||||
@@ -120,7 +116,7 @@ template <typename GfxFamily>
|
||||
void DrmCommandStreamReceiver<GfxFamily>::processResidency(const ResidencyContainer &inputAllocationsForResidency, uint32_t handleId) {
|
||||
for (auto &alloc : inputAllocationsForResidency) {
|
||||
auto drmAlloc = static_cast<DrmAllocation *>(alloc);
|
||||
drmAlloc->getBOsForResidency(osContext->getContextId(), handleId, this->residency);
|
||||
drmAlloc->makeBOsResident(osContext->getContextId(), 0u, handleId, &this->residency, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user