Revert "feature: bind resources as read only"

This reverts commit f3d36d3350.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2024-03-27 08:18:44 +01:00
committed by Compute-Runtime-Automation
parent 295b58a11f
commit 8e44a46983
28 changed files with 28 additions and 226 deletions

View File

@@ -266,26 +266,20 @@ TEST_F(IoctlPrelimHelperTests, whenGettingFlagsForVmBindThenProperValuesAreRetur
for (auto &bindCapture : ::testing::Bool()) {
for (auto &bindImmediate : ::testing::Bool()) {
for (auto &bindMakeResident : ::testing::Bool()) {
for (auto &readOnlyResource : ::testing::Bool()) {
auto flags = ioctlHelper.getFlagsForVmBind(bindCapture, bindImmediate, bindMakeResident, readOnlyResource);
if (bindCapture) {
EXPECT_EQ(PRELIM_I915_GEM_VM_BIND_CAPTURE, (flags & PRELIM_I915_GEM_VM_BIND_CAPTURE));
}
if (bindImmediate) {
EXPECT_EQ(PRELIM_I915_GEM_VM_BIND_IMMEDIATE, (flags & PRELIM_I915_GEM_VM_BIND_IMMEDIATE));
}
if (bindMakeResident) {
EXPECT_EQ(PRELIM_I915_GEM_VM_BIND_MAKE_RESIDENT, (flags & PRELIM_I915_GEM_VM_BIND_MAKE_RESIDENT));
}
if (readOnlyResource) {
EXPECT_EQ(PRELIM_I915_GEM_VM_BIND_READONLY, (flags & PRELIM_I915_GEM_VM_BIND_READONLY));
}
if (flags == 0) {
EXPECT_FALSE(bindCapture);
EXPECT_FALSE(bindImmediate);
EXPECT_FALSE(bindMakeResident);
EXPECT_FALSE(readOnlyResource);
}
auto flags = ioctlHelper.getFlagsForVmBind(bindCapture, bindImmediate, bindMakeResident);
if (bindCapture) {
EXPECT_EQ(PRELIM_I915_GEM_VM_BIND_CAPTURE, (flags & PRELIM_I915_GEM_VM_BIND_CAPTURE));
}
if (bindImmediate) {
EXPECT_EQ(PRELIM_I915_GEM_VM_BIND_IMMEDIATE, (flags & PRELIM_I915_GEM_VM_BIND_IMMEDIATE));
}
if (bindMakeResident) {
EXPECT_EQ(PRELIM_I915_GEM_VM_BIND_MAKE_RESIDENT, (flags & PRELIM_I915_GEM_VM_BIND_MAKE_RESIDENT));
}
if (flags == 0) {
EXPECT_FALSE(bindCapture);
EXPECT_FALSE(bindImmediate);
EXPECT_FALSE(bindMakeResident);
}
}
}

View File

@@ -318,10 +318,8 @@ TEST(IoctlHelperUpstreamTest, whenGettingFlagsForVmBindThenZeroIsReturned) {
for (auto &bindCapture : ::testing::Bool()) {
for (auto &bindImmediate : ::testing::Bool()) {
for (auto &bindMakeResident : ::testing::Bool()) {
for (auto &readOnlyResource : ::testing::Bool()) {
auto flags = ioctlHelper.getFlagsForVmBind(bindCapture, bindImmediate, bindMakeResident, readOnlyResource);
EXPECT_EQ(0u, flags);
}
auto flags = ioctlHelper.getFlagsForVmBind(bindCapture, bindImmediate, bindMakeResident);
EXPECT_EQ(0u, flags);
}
}
}

View File

@@ -261,7 +261,8 @@ TEST(IoctlHelperXeTest, givenIoctlHelperXeWhenCallingAnyMethodThenDummyValueIsRe
EXPECT_EQ(0u, xeIoctlHelper->getDirectSubmissionFlag());
EXPECT_EQ(0u, xeIoctlHelper->getFlagsForVmBind(false, false, false, false));
EXPECT_EQ(0u, xeIoctlHelper->getFlagsForVmBind(false, false, false));
std::vector<QueryItem> queryItems;
std::vector<DistanceInfo> distanceInfos;
EXPECT_EQ(0, xeIoctlHelper->queryDistances(queryItems, distanceInfos));
@@ -408,7 +409,7 @@ TEST(IoctlHelperXeTest, givenIoctlHelperXeWhenCallingAnyMethodThenDummyValueIsRe
EXPECT_EQ(static_cast<uint64_t>(XE_NEO_BIND_CAPTURE_FLAG |
XE_NEO_BIND_IMMEDIATE_FLAG |
XE_NEO_BIND_MAKERESIDENT_FLAG),
xeIoctlHelper->getFlagsForVmBind(true, true, true, true));
xeIoctlHelper->getFlagsForVmBind(true, true, true));
uint32_t fabricId = 0, latency = 0, bandwidth = 0;
EXPECT_FALSE(xeIoctlHelper->getFabricLatency(fabricId, latency, bandwidth));