fix: wait on userfence when VM immediate is used

Removed if condition when calling vm_bind in order to
reflect changed in KMD.
Specifically, dii-4347 to dii-4349 include changes on
strict fence ordering on vm_bind, where user fence has
to be inserted regardless of using pagefault or explicit
residency.

Related-To: NEO-11966
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
Young Jin Yoon
2024-07-19 19:18:23 +00:00
committed by Compute-Runtime-Automation
parent 4f3201b2ce
commit c01a5c45c7
2 changed files with 6 additions and 13 deletions

View File

@@ -1418,15 +1418,12 @@ int changeBufferObjectBinding(Drm *drm, OsContext *osContext, uint32_t vmHandleI
if (ioctlHelper->isWaitBeforeBindRequired(bind)) {
if (drm->useVMBindImmediate()) {
lock = drm->lockBindFenceMutex();
if (!drm->hasPageFaultSupport() || bo->isExplicitResidencyRequired()) {
auto nextExtension = vmBind.extensions;
incrementFenceValue = true;
programUserFence(drm, osContext, bo, vmBindExtUserFence, vmHandleId, nextExtension);
ioctlHelper->setVmBindUserFence(vmBind, vmBindExtUserFence);
}
}
}
if (bind) {
ret = ioctlHelper->vmBind(vmBind);
if (ret) {

View File

@@ -119,7 +119,7 @@ TEST(DrmVmBindTest, givenPerContextVmsAndBoRequiringExplicitResidencyWhenBinding
}
}
TEST(DrmVmBindTest, givenBoNotRequiringExplicitResidencyWhenCallingWaitForBindThenDontWaitOnUserFence) {
TEST(DrmVmBindTest, whenCallingWaitForBindThenWaitUserFenceIsCalled) {
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
executionEnvironment->initializeMemoryManager();
@@ -148,11 +148,7 @@ TEST(DrmVmBindTest, givenBoNotRequiringExplicitResidencyWhenCallingWaitForBindTh
drm.waitForBind(vmHandleId);
if (requireResidency) {
EXPECT_TRUE(drm.waitUserFenceCalled);
} else {
EXPECT_FALSE(drm.waitUserFenceCalled);
}
}
}