mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix xe: add missing wait on fence before unbind
Related-To: NEO-7306 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
2d0c61aa33
commit
415d2cb121
@@ -510,3 +510,13 @@ TEST_F(IoctlPrelimHelperTests, givenEnabledForceNonblockingExecbufferCallsFlagWh
|
||||
EXPECT_TRUE(ioctlHelper.checkIfIoctlReinvokeRequired(EAGAIN, DrmIoctl::GemVmBind));
|
||||
EXPECT_TRUE(ioctlHelper.checkIfIoctlReinvokeRequired(EBUSY, DrmIoctl::GemExecbuffer2));
|
||||
}
|
||||
|
||||
TEST_F(IoctlPrelimHelperTests, whenChangingBufferBindingThenWaitIsNeededOnlyBeforeBind) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
||||
|
||||
IoctlHelperPrelim20 ioctlHelper{*drm};
|
||||
|
||||
EXPECT_TRUE(ioctlHelper.isWaitBeforeBindRequired(true));
|
||||
EXPECT_FALSE(ioctlHelper.isWaitBeforeBindRequired(false));
|
||||
}
|
||||
|
||||
@@ -21,6 +21,16 @@ TEST(IoctlHelperUpstreamTest, whenGettingVmBindAvailabilityThenFalseIsReturned)
|
||||
IoctlHelperUpstream ioctlHelper{*drm};
|
||||
EXPECT_FALSE(ioctlHelper.isVmBindAvailable());
|
||||
}
|
||||
|
||||
TEST(IoctlHelperUpstreamTest, whenChangingBufferBindingThenWaitIsNeverNeeded) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
||||
|
||||
IoctlHelperUpstream ioctlHelper{*drm};
|
||||
|
||||
EXPECT_FALSE(ioctlHelper.isWaitBeforeBindRequired(true));
|
||||
EXPECT_FALSE(ioctlHelper.isWaitBeforeBindRequired(false));
|
||||
}
|
||||
TEST(IoctlHelperUpstreamTest, whenGettingIoctlRequestStringThenProperStringIsReturned) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = std::make_unique<DrmTipMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
|
||||
@@ -36,6 +36,16 @@ TEST(IoctlHelperXeTest, givenXeDrmVersionsWhenGettingIoctlHelperThenValidIoctlHe
|
||||
EXPECT_NE(nullptr, xeIoctlHelper);
|
||||
}
|
||||
|
||||
TEST(IoctlHelperXeTest, whenChangingBufferBindingThenWaitIsNeededAlways) {
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
std::unique_ptr<Drm> drm{Drm::create(std::make_unique<HwDeviceIdDrm>(0, ""), *executionEnvironment.rootDeviceEnvironments[0])};
|
||||
|
||||
IoctlHelperXe ioctlHelper{*drm};
|
||||
|
||||
EXPECT_TRUE(ioctlHelper.isWaitBeforeBindRequired(true));
|
||||
EXPECT_TRUE(ioctlHelper.isWaitBeforeBindRequired(false));
|
||||
}
|
||||
|
||||
TEST(IoctlHelperXeTest, givenIoctlHelperXeWhenCallingAnyMethodThenDummyValueIsReturned) {
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
|
||||
|
||||
Reference in New Issue
Block a user