fix: remove obsolete workaround about memory locking

Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
This commit is contained in:
Naklicki, Mateusz
2024-10-02 14:31:25 +00:00
committed by Compute-Runtime-Automation
parent 6c7e6b07bf
commit 516e502b8c
3 changed files with 2 additions and 63 deletions

View File

@@ -1435,10 +1435,10 @@ int changeBufferObjectBinding(Drm *drm, OsContext *osContext, uint32_t vmHandleI
bool readOnlyResource = bo->isReadOnlyGpuResource();
if (drm->useVMBindImmediate()) {
bindMakeResident = bo->isExplicitResidencyRequired() && bo->isLockable();
bindMakeResident = bo->isExplicitResidencyRequired();
bindImmediate = true;
}
bool bindLock = bo->isExplicitLockedMemoryRequired() && bo->isLockable();
bool bindLock = bo->isExplicitLockedMemoryRequired();
flags |= ioctlHelper->getFlagsForVmBind(bindCapture, bindImmediate, bindMakeResident, bindLock, readOnlyResource);
}
@@ -1532,14 +1532,8 @@ int changeBufferObjectBinding(Drm *drm, OsContext *osContext, uint32_t vmHandleI
int Drm::bindBufferObject(OsContext *osContext, uint32_t vmHandleId, BufferObject *bo) {
auto ret = changeBufferObjectBinding(this, osContext, vmHandleId, bo, true);
if (ret != 0) {
errno = 0;
static_cast<DrmMemoryOperationsHandlerBind *>(this->rootDeviceEnvironment.memoryOperationsInterface.get())->evictUnusedAllocations(false, false);
ret = changeBufferObjectBinding(this, osContext, vmHandleId, bo, true);
if ((getErrno() == ENOMEM) && pageFaultSupported) {
DEBUG_BREAK_IF(true);
bo->setIsLockable(false);
ret = changeBufferObjectBinding(this, osContext, vmHandleId, bo, true);
}
}
return ret;
}