Skip to content

Commit 95b3d16

Browse files
Revert "fix: add scratch page support with xekmd"
This reverts commit dec695f. Signed-off-by: Compute-Runtime-Validation <[email protected]>
1 parent ed813de commit 95b3d16

File tree

8 files changed

+15
-33
lines changed

8 files changed

+15
-33
lines changed

shared/source/os_interface/linux/xe/ioctl_helper_xe.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,9 +968,6 @@ uint32_t IoctlHelperXe::getFlagsForVmCreate(bool disableScratch, bool enablePage
968968
if (enablePageFault) {
969969
flags |= DRM_XE_VM_CREATE_FLAG_FAULT_MODE;
970970
}
971-
if (!disableScratch) {
972-
flags |= DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE;
973-
}
974971
return flags;
975972
}
976973

shared/source/xe2_hpg_core/linux/product_helper_bmg.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,5 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
3333
return 0;
3434
}
3535

36-
template <>
37-
bool ProductHelperHw<gfxProduct>::isDisableScratchPagesSupported() const {
38-
return true;
39-
}
40-
4136
template class ProductHelperHw<gfxProduct>;
4237
} // namespace NEO

shared/source/xe2_hpg_core/linux/product_helper_lnl.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,5 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
3535
return 0;
3636
}
3737

38-
template <>
39-
bool ProductHelperHw<gfxProduct>::isDisableScratchPagesSupported() const {
40-
return true;
41-
}
42-
4338
template class ProductHelperHw<gfxProduct>;
4439
} // namespace NEO

shared/test/unit_test/os_interface/linux/drm_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ HWTEST2_F(DrmDisableScratchPagesDefaultTest,
15491549
}
15501550

15511551
HWTEST2_F(DrmDisableScratchPagesDefaultTest,
1552-
givenDefaultDisableScratchPagesThenCheckingGpuFaultCheckIsSetToDefaultAndScratchPageIsEnabled, IsBeforeXeHpcCore) {
1552+
givenDefaultDisableScratchPagesThenCheckingGpuFaultCheckIsSetToDefaultAndScratchPageIsEnabled, IsNotPVC) {
15531553
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
15541554
DrmMockCheckPageFault drm{*executionEnvironment->rootDeviceEnvironments[0]};
15551555
drm.configureScratchPagePolicy();

shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -456,20 +456,14 @@ TEST_F(IoctlHelperXeTest, whenGettingFlagsForVmCreateThenPropertValueIsReturned)
456456
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
457457
auto xeIoctlHelper = std::make_unique<IoctlHelperXe>(drm);
458458

459-
for (auto &disableScratch : ::testing::Bool()) {
460-
for (auto &enablePageFault : ::testing::Bool()) {
461-
for (auto &useVmBind : ::testing::Bool()) {
462-
auto flags = xeIoctlHelper->getFlagsForVmCreate(disableScratch, enablePageFault, useVmBind);
463-
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), (flags & DRM_XE_VM_CREATE_FLAG_LR_MODE));
464-
if (enablePageFault) {
465-
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_FAULT_MODE), (flags & DRM_XE_VM_CREATE_FLAG_FAULT_MODE));
466-
}
467-
if (!disableScratch) {
468-
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE), (flags & DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE));
469-
}
470-
}
471-
}
472-
}
459+
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE | DRM_XE_VM_CREATE_FLAG_FAULT_MODE), xeIoctlHelper->getFlagsForVmCreate(true, true, true));
460+
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE | DRM_XE_VM_CREATE_FLAG_FAULT_MODE), xeIoctlHelper->getFlagsForVmCreate(true, true, false));
461+
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE | DRM_XE_VM_CREATE_FLAG_FAULT_MODE), xeIoctlHelper->getFlagsForVmCreate(false, true, true));
462+
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE | DRM_XE_VM_CREATE_FLAG_FAULT_MODE), xeIoctlHelper->getFlagsForVmCreate(false, true, false));
463+
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), xeIoctlHelper->getFlagsForVmCreate(true, false, true));
464+
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), xeIoctlHelper->getFlagsForVmCreate(true, false, false));
465+
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), xeIoctlHelper->getFlagsForVmCreate(false, false, true));
466+
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), xeIoctlHelper->getFlagsForVmCreate(false, false, false));
473467
}
474468

475469
TEST_F(IoctlHelperXeTest, whenGettingFlagsForVmBindThenPropertValueIsReturned) {

shared/test/unit_test/os_interface/product_helper_tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfKmdMigrationIsSupported
457457
EXPECT_FALSE(productHelper->isKmdMigrationSupported());
458458
}
459459

460-
HWTEST2_F(ProductHelperTest, givenProductHelperWhenAskedIfDisableScratchPagesIsSupportedThenReturnFalse, IsBeforeXeHpcCore) {
460+
HWTEST2_F(ProductHelperTest, givenProductHelperWhenAskedIfDisableScratchPagesIsSupportedThenReturnFalse, IsNotPVC) {
461+
461462
EXPECT_FALSE(productHelper->isDisableScratchPagesSupported());
462463
}
463464

shared/test/unit_test/xe2_hpg_core/bmg/linux/product_helper_tests_bmg_linux.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ BMGTEST_F(BmgProductHelperLinux, givenProductHelperWhenAskedIsKmdMigrationSuppor
6161
EXPECT_FALSE(productHelper->isKmdMigrationSupported());
6262
}
6363

64-
BMGTEST_F(BmgProductHelperLinux, givenProductHelperWhenAskedIsDisableScratchPagesSupportedThenReturnTrue) {
65-
EXPECT_TRUE(productHelper->isDisableScratchPagesSupported());
64+
BMGTEST_F(BmgProductHelperLinux, givenProductHelperWhenAskedIsDisableScratchPagesSupportedThenReturnFalse) {
65+
EXPECT_FALSE(productHelper->isDisableScratchPagesSupported());
6666
}
6767

6868
BMGTEST_F(BmgProductHelperLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) {

shared/test/unit_test/xe2_hpg_core/lnl/linux/product_helper_tests_lnl_linux.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenAskedIsKmdMigrationSuppor
6060
EXPECT_FALSE(productHelper->isKmdMigrationSupported());
6161
}
6262

63-
LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenAskedIsDisableScratchPagesSupportedThenReturnTrue) {
64-
EXPECT_TRUE(productHelper->isDisableScratchPagesSupported());
63+
LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenAskedIsDisableScratchPagesSupportedThenReturnFalse) {
64+
EXPECT_FALSE(productHelper->isDisableScratchPagesSupported());
6565
}
6666

6767
LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenCheckDirectSubmissionSupportedThenFalseIsReturned) {

0 commit comments

Comments
 (0)