Prepare to switch to new residency model

Related-To: NEO-5007

Change-Id: Ia9b43ca7fea0ef315af5caff5a53a84ffc363937
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2020-09-04 09:17:58 +02:00
committed by sys_ocldev
parent c4fb85256f
commit 9ea9baf1ad
3 changed files with 2 additions and 16 deletions

View File

@@ -84,20 +84,8 @@ MemoryOperationsStatus DrmMemoryOperationsHandlerBind::isResident(Device *device
}
void DrmMemoryOperationsHandlerBind::mergeWithResidencyContainer(OsContext *osContext, ResidencyContainer &residencyContainer) {
if (DebugManager.flags.BindAllAllocations.get()) {
this->makeResidentWithinOsContext(osContext, ArrayRef<GraphicsAllocation *>(residencyContainer));
residencyContainer.clear();
return;
}
std::lock_guard<std::mutex> lock(mutex);
for (auto gfxAllocation = residencyContainer.begin(); gfxAllocation != residencyContainer.end();) {
if ((*gfxAllocation)->isAlwaysResident(osContext->getContextId())) {
gfxAllocation = residencyContainer.erase(gfxAllocation);
} else {
gfxAllocation++;
}
}
this->makeResidentWithinOsContext(osContext, ArrayRef<GraphicsAllocation *>(residencyContainer));
residencyContainer.clear();
}
std::unique_lock<std::mutex> DrmMemoryOperationsHandlerBind::lockHandlerForExecWA() {