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

@ -85,7 +85,6 @@ DirectSubmissionEnableDebugBuffer = 0
DirectSubmissionDiagnosticExecutionCount = 30
DirectSubmissionDisableCacheFlush = 0
DirectSubmissionDisableMonitorFence = 0
BindAllAllocations = 0
EnableNullHardware = 0
ForceLinearImages = 0
ForceSLML3Config = 0

View File

@ -138,7 +138,6 @@ DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideRenderSupport, -1, "Over
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideComputeSupport, -1, "Overrides default compute support: -1: do not override, 0: disable engine support, 1: enable engine support")
DECLARE_DEBUG_VARIABLE(bool, DirectSubmissionDisableCacheFlush, false, "Disable dispatching cache flush commands")
DECLARE_DEBUG_VARIABLE(bool, DirectSubmissionDisableMonitorFence, false, "Disable dispatching monitor fence commands")
DECLARE_DEBUG_VARIABLE(bool, BindAllAllocations, false, "Bind all allocations during flush")
/*FEATURE FLAGS*/
DECLARE_DEBUG_VARIABLE(bool, EnableNV12, true, "Enables NV12 extension")

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() {