Delete unnecessary checks in isWorkaroundRequired function related tests

Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
This commit is contained in:
Rafal Maziejuk
2021-08-26 14:57:05 +00:00
committed by Compute-Runtime-Automation
parent 4f77db267b
commit f309cdff2f
3 changed files with 23 additions and 49 deletions

View File

@@ -304,26 +304,6 @@ GEN12LPTEST_F(MemorySynchronizatiopCommandsTests, whenSettingCacheFlushExtraFiel
EXPECT_FALSE(args.constantCacheInvalidationEnable);
}
GEN12LPTEST_F(HwHelperTestGen12Lp, givenUnknownProductFamilyWhenGettingIsWorkaroundRequiredThenFalseIsReturned) {
const auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
uint32_t steppings[] = {
REVISION_A0,
REVISION_B,
REVISION_C,
CommonConstants::invalidStepping};
hardwareInfo.platform.eProductFamily = IGFX_UNKNOWN;
for (auto stepping : steppings) {
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(stepping, hardwareInfo);
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hardwareInfo));
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_C, hardwareInfo));
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_D, hardwareInfo));
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_B, REVISION_A0, hardwareInfo));
}
}
GEN12LPTEST_F(HwHelperTestGen12Lp, givenGen12WhenCallIsPackedSupportedThenReturnTrue) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_TRUE(helper.packedFormatsSupported());

View File

@@ -124,35 +124,33 @@ XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenDifferentBufferSizesWhenEnableSta
}
XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenRevisionEnumAndPlatformFamilyTypeThenProperValueForIsWorkaroundRequiredIsReturned) {
std::vector<unsigned short> steppings;
PRODUCT_FAMILY productFamilies[] = {IGFX_XE_HP_SDV, IGFX_TIGERLAKE_LP, IGFX_UNKNOWN};
uint32_t steppings[] = {
REVISION_A0,
REVISION_A1,
REVISION_C,
REVISION_D,
CommonConstants::invalidStepping,
};
for (auto productFamily : productFamilies) {
hardwareInfo.platform.eProductFamily = productFamily;
steppings.push_back(0x0);
steppings.push_back(0x1);
steppings.push_back(0x4);
steppings.push_back(0x5);
const auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
for (auto stepping : steppings) {
hardwareInfo.platform.usRevId = stepping;
HwHelper &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
for (auto stepping : steppings) {
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(stepping, hardwareInfo);
if (hardwareInfo.platform.eProductFamily == IGFX_XE_HP_SDV) {
if (stepping == 0x0) { //A0
EXPECT_TRUE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hardwareInfo));
EXPECT_TRUE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_A1, hardwareInfo));
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_B, REVISION_A0, hardwareInfo));
} else if (stepping == 0x1) { //A1
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_A1, hardwareInfo));
} else if (stepping == 0x4 || stepping == 0x5) { //B0, undefined
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_D, hardwareInfo));
}
} else {
if (hardwareInfo.platform.eProductFamily == IGFX_XE_HP_SDV) {
if (stepping == REVISION_A0) {
EXPECT_TRUE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hardwareInfo));
EXPECT_TRUE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_A1, hardwareInfo));
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_B, REVISION_A0, hardwareInfo));
} else if (stepping == REVISION_A1) {
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_A1, hardwareInfo));
} else if (stepping == REVISION_C || stepping == REVISION_D) { //undefined
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_D, hardwareInfo));
}
} else {
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_D, hardwareInfo));
}
steppings.clear();
}
}