mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: remove obsolete workaround about memory locking
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6c7e6b07bf
commit
516e502b8c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user