mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
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:
committed by
Compute-Runtime-Automation
parent
4f3201b2ce
commit
c01a5c45c7
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user