fix: initialize max capability values for ARL

setup max values when overriding hw info with debug key

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-11-15 10:05:30 +00:00
committed by Compute-Runtime-Automation
parent 02ef252b7d
commit a0f8e8accc
4 changed files with 34 additions and 6 deletions

View File

@@ -56,19 +56,21 @@ ARLTEST_F(ArlProductHelperLinux, givenProductHelperWhenAskedIsPageFaultSupported
}
using ArlHwInfoLinux = ::testing::Test;
TEST_F(ArlHwInfoLinux, whenSetupHardwareInfoThenGtSetupIsCorrect) {
ARLTEST_F(ArlHwInfoLinux, whenSetupHardwareInfoThenGtSetupIsCorrect) {
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
executionEnvironment->prepareRootDeviceEnvironments(1);
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
executionEnvironment->rootDeviceEnvironments[0]->initGmm();
auto &gtSystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getMutableHardwareInfo()->gtSystemInfo;
gtSystemInfo = {};
DrmMock drm(*executionEnvironment->rootDeviceEnvironments[0]);
DeviceDescriptor device = {0, &ArlHwConfig::hwInfo, &ArlHwConfig::setupHardwareInfo};
int ret = drm.setupHardwareInfo(&device, false);
const auto &gtSystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
EXPECT_EQ(ret, 0);
EXPECT_GT(gtSystemInfo.EUCount, 0u);
EXPECT_GT(gtSystemInfo.ThreadCount, 0u);
@@ -78,6 +80,8 @@ TEST_F(ArlHwInfoLinux, whenSetupHardwareInfoThenGtSetupIsCorrect) {
EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u);
EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u);
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u);
EXPECT_GT(gtSystemInfo.MaxDualSubSlicesSupported, 0u);
EXPECT_GT(gtSystemInfo.MaxSlicesSupported, 0u);
EXPECT_GT(gtSystemInfo.MaxSubSlicesSupported, 0u);
EXPECT_GT(gtSystemInfo.MaxEuPerSubSlice, 0u);
}