Revert "fix: add scratch page support with xekmd"

This reverts commit dec695f405.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation 2024-12-23 18:39:54 +01:00 committed by Compute-Runtime-Automation
parent ed813def70
commit 95b3d16d76
8 changed files with 15 additions and 33 deletions

View File

@ -968,9 +968,6 @@ uint32_t IoctlHelperXe::getFlagsForVmCreate(bool disableScratch, bool enablePage
if (enablePageFault) { if (enablePageFault) {
flags |= DRM_XE_VM_CREATE_FLAG_FAULT_MODE; flags |= DRM_XE_VM_CREATE_FLAG_FAULT_MODE;
} }
if (!disableScratch) {
flags |= DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE;
}
return flags; return flags;
} }

View File

@ -33,10 +33,5 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
return 0; return 0;
} }
template <>
bool ProductHelperHw<gfxProduct>::isDisableScratchPagesSupported() const {
return true;
}
template class ProductHelperHw<gfxProduct>; template class ProductHelperHw<gfxProduct>;
} // namespace NEO } // namespace NEO

View File

@ -35,10 +35,5 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
return 0; return 0;
} }
template <>
bool ProductHelperHw<gfxProduct>::isDisableScratchPagesSupported() const {
return true;
}
template class ProductHelperHw<gfxProduct>; template class ProductHelperHw<gfxProduct>;
} // namespace NEO } // namespace NEO

View File

@ -1549,7 +1549,7 @@ HWTEST2_F(DrmDisableScratchPagesDefaultTest,
} }
HWTEST2_F(DrmDisableScratchPagesDefaultTest, HWTEST2_F(DrmDisableScratchPagesDefaultTest,
givenDefaultDisableScratchPagesThenCheckingGpuFaultCheckIsSetToDefaultAndScratchPageIsEnabled, IsBeforeXeHpcCore) { givenDefaultDisableScratchPagesThenCheckingGpuFaultCheckIsSetToDefaultAndScratchPageIsEnabled, IsNotPVC) {
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>(); auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
DrmMockCheckPageFault drm{*executionEnvironment->rootDeviceEnvironments[0]}; DrmMockCheckPageFault drm{*executionEnvironment->rootDeviceEnvironments[0]};
drm.configureScratchPagePolicy(); drm.configureScratchPagePolicy();

View File

@ -456,20 +456,14 @@ TEST_F(IoctlHelperXeTest, whenGettingFlagsForVmCreateThenPropertValueIsReturned)
DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]}; DrmMock drm{*executionEnvironment->rootDeviceEnvironments[0]};
auto xeIoctlHelper = std::make_unique<IoctlHelperXe>(drm); auto xeIoctlHelper = std::make_unique<IoctlHelperXe>(drm);
for (auto &disableScratch : ::testing::Bool()) { 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));
for (auto &enablePageFault : ::testing::Bool()) { 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));
for (auto &useVmBind : ::testing::Bool()) { 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));
auto flags = xeIoctlHelper->getFlagsForVmCreate(disableScratch, enablePageFault, useVmBind); 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));
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), (flags & DRM_XE_VM_CREATE_FLAG_LR_MODE)); EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), xeIoctlHelper->getFlagsForVmCreate(true, false, true));
if (enablePageFault) { EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), xeIoctlHelper->getFlagsForVmCreate(true, false, false));
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_FAULT_MODE), (flags & DRM_XE_VM_CREATE_FLAG_FAULT_MODE)); EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), xeIoctlHelper->getFlagsForVmCreate(false, false, true));
} EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_LR_MODE), xeIoctlHelper->getFlagsForVmCreate(false, false, false));
if (!disableScratch) {
EXPECT_EQ(static_cast<uint32_t>(DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE), (flags & DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE));
}
}
}
}
} }
TEST_F(IoctlHelperXeTest, whenGettingFlagsForVmBindThenPropertValueIsReturned) { TEST_F(IoctlHelperXeTest, whenGettingFlagsForVmBindThenPropertValueIsReturned) {

View File

@ -457,7 +457,8 @@ HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfKmdMigrationIsSupported
EXPECT_FALSE(productHelper->isKmdMigrationSupported()); EXPECT_FALSE(productHelper->isKmdMigrationSupported());
} }
HWTEST2_F(ProductHelperTest, givenProductHelperWhenAskedIfDisableScratchPagesIsSupportedThenReturnFalse, IsBeforeXeHpcCore) { HWTEST2_F(ProductHelperTest, givenProductHelperWhenAskedIfDisableScratchPagesIsSupportedThenReturnFalse, IsNotPVC) {
EXPECT_FALSE(productHelper->isDisableScratchPagesSupported()); EXPECT_FALSE(productHelper->isDisableScratchPagesSupported());
} }

View File

@ -61,8 +61,8 @@ BMGTEST_F(BmgProductHelperLinux, givenProductHelperWhenAskedIsKmdMigrationSuppor
EXPECT_FALSE(productHelper->isKmdMigrationSupported()); EXPECT_FALSE(productHelper->isKmdMigrationSupported());
} }
BMGTEST_F(BmgProductHelperLinux, givenProductHelperWhenAskedIsDisableScratchPagesSupportedThenReturnTrue) { BMGTEST_F(BmgProductHelperLinux, givenProductHelperWhenAskedIsDisableScratchPagesSupportedThenReturnFalse) {
EXPECT_TRUE(productHelper->isDisableScratchPagesSupported()); EXPECT_FALSE(productHelper->isDisableScratchPagesSupported());
} }
BMGTEST_F(BmgProductHelperLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) { BMGTEST_F(BmgProductHelperLinux, WhenGtIsSetupThenGtSystemInfoIsCorrect) {

View File

@ -60,8 +60,8 @@ LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenAskedIsKmdMigrationSuppor
EXPECT_FALSE(productHelper->isKmdMigrationSupported()); EXPECT_FALSE(productHelper->isKmdMigrationSupported());
} }
LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenAskedIsDisableScratchPagesSupportedThenReturnTrue) { LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenAskedIsDisableScratchPagesSupportedThenReturnFalse) {
EXPECT_TRUE(productHelper->isDisableScratchPagesSupported()); EXPECT_FALSE(productHelper->isDisableScratchPagesSupported());
} }
LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenCheckDirectSubmissionSupportedThenFalseIsReturned) { LNLTEST_F(LnlProductHelperLinux, givenProductHelperWhenCheckDirectSubmissionSupportedThenFalseIsReturned) {