fix: Set vmbind user fence when makeMemoryResident

Related-To: NEO-11977, GSD-10293

Signed-off-by: Chandio, Bibrak Qamar <bibrak.qamar.chandio@intel.com>
This commit is contained in:
Chandio, Bibrak Qamar
2024-12-31 13:48:34 +00:00
committed by Compute-Runtime-Automation
parent 894b788267
commit 80dc4fb43a
51 changed files with 725 additions and 304 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -124,6 +124,28 @@ void OsContextLinux::waitForBind(uint32_t drmIterator) {
}
}
void OsContextLinux::waitForPagingFenceGivenFenceVal(uint64_t fenceValToWait) {
for (auto drmIterator = 0u; drmIterator < this->deviceBitfield.size(); drmIterator++) {
if (this->deviceBitfield.test(drmIterator)) {
this->waitForBindGivenFenceVal(drmIterator, fenceValToWait);
}
}
}
void OsContextLinux::waitForBindGivenFenceVal(uint32_t drmIterator, uint64_t fenceValToWait) {
if (drm.isPerContextVMRequired()) {
if (pagingFence[drmIterator] >= fenceValToWait) {
return;
}
auto fenceAddress = castToUint64(&this->pagingFence[drmIterator]);
drm.waitUserFence(0u, fenceAddress, fenceValToWait, Drm::ValueWidth::u64, -1, drm.getIoctlHelper()->getWaitUserFenceSoftFlag(), false, NEO::InterruptId::notUsed, nullptr);
} else {
drm.waitForBindGivenFenceVal(drmIterator, fenceValToWait);
}
}
void OsContextLinux::reInitializeContext() {}
uint64_t OsContextLinux::getOfflineDumpContextId(uint32_t deviceIndex) const {