Skip to content

Commit 54e62da

Browse files
fix: use release helper to get ftrXe2Compression value
Related-To: NEO-13381, NEO-13526 Signed-off-by: Maciej Plewka <[email protected]>
1 parent 5bc0633 commit 54e62da

File tree

16 files changed

+37
-33
lines changed

16 files changed

+37
-33
lines changed

shared/source/helpers/hw_info.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void setupDefaultGtSysInfo(HardwareInfo *hwInfo, const ReleaseHelper *releaseHel
152152
gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu();
153153
}
154154

155-
void setupDefaultFeatureTableAndWorkaroundTable(HardwareInfo *hwInfo) {
155+
void setupDefaultFeatureTableAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper) {
156156
FeatureTable *featureTable = &hwInfo->featureTable;
157157

158158
featureTable->flags.ftrAstcHdr2D = true;
@@ -172,6 +172,8 @@ void setupDefaultFeatureTableAndWorkaroundTable(HardwareInfo *hwInfo) {
172172
featureTable->flags.ftrTranslationTable = true;
173173
featureTable->flags.ftrUserModeTranslationTable = true;
174174

175+
featureTable->flags.ftrXe2Compression = releaseHelper.getFtrXe2Compression();
176+
175177
WorkaroundTable *workaroundTable = &hwInfo->workaroundTable;
176178

177179
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;

shared/source/helpers/hw_info.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void setHwInfoValuesFromConfig(const uint64_t hwInfoConfig, HardwareInfo &hwInfo
168168
bool parseHwInfoConfigString(const std::string &hwInfoConfigStr, uint64_t &hwInfoConfig);
169169
aub_stream::EngineType getChosenEngineType(const HardwareInfo &hwInfo);
170170
void setupDefaultGtSysInfo(HardwareInfo *hwInfo, const ReleaseHelper *releaseHelper);
171-
void setupDefaultFeatureTableAndWorkaroundTable(HardwareInfo *hwInfo);
171+
void setupDefaultFeatureTableAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper);
172172
uint32_t getNumSubSlicesPerSlice(const HardwareInfo &hwInfo);
173173

174174
} // namespace NEO

shared/source/xe2_hpg_core/hw_cmds_bmg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct BMG : public Xe2HpgCoreFamily {
1818
static WorkaroundTable workaroundTable;
1919
static const RuntimeCapabilityTable capabilityTable;
2020
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
21-
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
21+
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper);
2222
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper);
2323
static void adjustHardwareInfo(HardwareInfo *hwInfo);
2424

shared/source/xe2_hpg_core/hw_cmds_lnl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct LNL : public Xe2HpgCoreFamily {
1818
static WorkaroundTable workaroundTable;
1919
static const RuntimeCapabilityTable capabilityTable;
2020
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
21-
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
21+
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper);
2222
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper);
2323
static void adjustHardwareInfo(HardwareInfo *hwInfo);
2424

shared/source/xe2_hpg_core/hw_info_bmg.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,15 @@ const RuntimeCapabilityTable BMG::capabilityTable{
8686
0 // cxlType
8787
};
8888

89-
void BMG::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
90-
setupDefaultFeatureTableAndWorkaroundTable(hwInfo);
89+
void BMG::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper) {
90+
setupDefaultFeatureTableAndWorkaroundTable(hwInfo, releaseHelper);
9191
FeatureTable *featureTable = &hwInfo->featureTable;
9292

9393
featureTable->flags.ftrLocalMemory = true;
9494
featureTable->flags.ftrFlatPhysCCS = true;
9595
featureTable->flags.ftrE2ECompression = true;
9696
featureTable->flags.ftrTile64Optimization = true;
9797
featureTable->flags.ftrWalkerMTP = true;
98-
featureTable->flags.ftrXe2Compression = true;
9998
featureTable->flags.ftrXe2PlusTiling = true;
10099
featureTable->flags.ftrL3TransientDataFlush = true;
101100
featureTable->flags.ftrPml5Support = true;
@@ -122,7 +121,7 @@ void BMG::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndW
122121

123122
BMG::adjustHardwareInfo(hwInfo);
124123
if (setupFeatureTableAndWorkaroundTable) {
125-
BMG::setupFeatureAndWorkaroundTable(hwInfo);
124+
BMG::setupFeatureAndWorkaroundTable(hwInfo, *releaseHelper);
126125
}
127126
}
128127

shared/source/xe2_hpg_core/hw_info_lnl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ const RuntimeCapabilityTable LNL::capabilityTable{
8484
0 // cxlType
8585
};
8686

87-
void LNL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
88-
setupDefaultFeatureTableAndWorkaroundTable(hwInfo);
87+
void LNL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper) {
88+
setupDefaultFeatureTableAndWorkaroundTable(hwInfo, releaseHelper);
8989
FeatureTable *featureTable = &hwInfo->featureTable;
9090

9191
featureTable->flags.ftrFlatPhysCCS = true;
@@ -117,7 +117,7 @@ void LNL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndW
117117

118118
LNL::adjustHardwareInfo(hwInfo);
119119
if (setupFeatureTableAndWorkaroundTable) {
120-
LNL::setupFeatureAndWorkaroundTable(hwInfo);
120+
LNL::setupFeatureAndWorkaroundTable(hwInfo, *releaseHelper);
121121
}
122122
}
123123
void LnlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {

shared/source/xe_hpc_core/hw_cmds_pvc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct PVC : public XeHpcCoreFamily {
3939
};
4040

4141
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
42-
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
42+
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper);
4343
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper);
4444
static void setupHardwareInfoMultiTileBase(HardwareInfo *hwInfo, bool setupMultiTile);
4545
static void adjustHardwareInfo(HardwareInfo *hwInfo);

shared/source/xe_hpc_core/hw_info_pvc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ const RuntimeCapabilityTable PVC::capabilityTable{
9696
0 // cxlType
9797
};
9898

99-
void PVC::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
100-
setupDefaultFeatureTableAndWorkaroundTable(hwInfo);
99+
void PVC::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper) {
100+
setupDefaultFeatureTableAndWorkaroundTable(hwInfo, releaseHelper);
101101
FeatureTable *featureTable = &hwInfo->featureTable;
102102

103103
featureTable->flags.ftrLocalMemory = true;
@@ -118,7 +118,7 @@ void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndW
118118
PVC::adjustHardwareInfo(hwInfo);
119119

120120
if (setupFeatureTableAndWorkaroundTable) {
121-
setupFeatureAndWorkaroundTable(hwInfo);
121+
setupFeatureAndWorkaroundTable(hwInfo, *releaseHelper);
122122
}
123123
}
124124

shared/source/xe_hpg_core/hw_cmds_arl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Intel Corporation
2+
* Copyright (C) 2023-2024 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -18,7 +18,7 @@ struct ARL : public XeHpgCoreFamily {
1818
static WorkaroundTable workaroundTable;
1919
static const RuntimeCapabilityTable capabilityTable;
2020
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
21-
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
21+
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper);
2222
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper);
2323
};
2424

shared/source/xe_hpg_core/hw_cmds_dg2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct DG2 : public XeHpgCoreFamily {
2727
static WorkaroundTable workaroundTable;
2828
static const RuntimeCapabilityTable capabilityTable;
2929
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
30-
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
30+
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper);
3131
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper);
3232

3333
static bool isG10(const HardwareInfo &hwInfo) {

shared/source/xe_hpg_core/hw_cmds_mtl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct MTL : public XeHpgCoreFamily {
1818
static WorkaroundTable workaroundTable;
1919
static const RuntimeCapabilityTable capabilityTable;
2020
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
21-
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
21+
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper);
2222
static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper);
2323
};
2424

shared/source/xe_hpg_core/hw_info_arl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ const RuntimeCapabilityTable ARL::capabilityTable{
8484
WorkaroundTable ARL::workaroundTable = {};
8585
FeatureTable ARL::featureTable = {};
8686

87-
void ARL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
88-
setupDefaultFeatureTableAndWorkaroundTable(hwInfo);
87+
void ARL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper) {
88+
setupDefaultFeatureTableAndWorkaroundTable(hwInfo, releaseHelper);
8989
FeatureTable *featureTable = &hwInfo->featureTable;
9090
WorkaroundTable *workaroundTable = &hwInfo->workaroundTable;
9191

@@ -99,7 +99,7 @@ void ARL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndW
9999
setupDefaultGtSysInfo(hwInfo, releaseHelper);
100100

101101
if (setupFeatureTableAndWorkaroundTable) {
102-
setupFeatureAndWorkaroundTable(hwInfo);
102+
setupFeatureAndWorkaroundTable(hwInfo, *releaseHelper);
103103
}
104104
}
105105

@@ -115,7 +115,7 @@ void ArlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable
115115
ARL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
116116

117117
if (setupFeatureTableAndWorkaroundTable) {
118-
ARL::setupFeatureAndWorkaroundTable(hwInfo);
118+
ARL::setupFeatureAndWorkaroundTable(hwInfo, *releaseHelper);
119119
}
120120
};
121121

shared/source/xe_hpg_core/hw_info_dg2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ const RuntimeCapabilityTable DG2::capabilityTable{
8989
WorkaroundTable DG2::workaroundTable = {};
9090
FeatureTable DG2::featureTable = {};
9191

92-
void DG2::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
93-
setupDefaultFeatureTableAndWorkaroundTable(hwInfo);
92+
void DG2::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper) {
93+
setupDefaultFeatureTableAndWorkaroundTable(hwInfo, releaseHelper);
9494
FeatureTable *featureTable = &hwInfo->featureTable;
9595

9696
featureTable->flags.ftrFlatPhysCCS = true;
@@ -105,7 +105,7 @@ void DG2::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndW
105105
setupDefaultGtSysInfo(hwInfo, releaseHelper);
106106

107107
if (setupFeatureTableAndWorkaroundTable) {
108-
setupFeatureAndWorkaroundTable(hwInfo);
108+
setupFeatureAndWorkaroundTable(hwInfo, *releaseHelper);
109109
}
110110
}
111111

shared/source/xe_hpg_core/hw_info_mtl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ const RuntimeCapabilityTable MTL::capabilityTable{
8585
WorkaroundTable MTL::workaroundTable = {};
8686
FeatureTable MTL::featureTable = {};
8787

88-
void MTL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
89-
setupDefaultFeatureTableAndWorkaroundTable(hwInfo);
88+
void MTL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper) {
89+
setupDefaultFeatureTableAndWorkaroundTable(hwInfo, releaseHelper);
9090
FeatureTable *featureTable = &hwInfo->featureTable;
9191
WorkaroundTable *workaroundTable = &hwInfo->workaroundTable;
9292

@@ -100,7 +100,7 @@ void MTL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndW
100100
setupDefaultGtSysInfo(hwInfo, releaseHelper);
101101

102102
if (setupFeatureTableAndWorkaroundTable) {
103-
setupFeatureAndWorkaroundTable(hwInfo);
103+
setupFeatureAndWorkaroundTable(hwInfo, *releaseHelper);
104104
}
105105
}
106106

@@ -116,7 +116,7 @@ void MtlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable
116116
MTL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
117117

118118
if (setupFeatureTableAndWorkaroundTable) {
119-
MTL::setupFeatureAndWorkaroundTable(hwInfo);
119+
MTL::setupFeatureAndWorkaroundTable(hwInfo, *releaseHelper);
120120
}
121121
};
122122

shared/test/unit_test/device/neo_device_tests.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "shared/test/common/mocks/mock_io_functions.h"
3636
#include "shared/test/common/mocks/mock_memory_manager.h"
3737
#include "shared/test/common/mocks/mock_product_helper.h"
38+
#include "shared/test/common/mocks/mock_release_helper.h"
3839
#include "shared/test/common/mocks/ult_device_factory.h"
3940
#include "shared/test/common/test_macros/hw_test.h"
4041
#include "shared/test/common/test_macros/test.h"
@@ -1930,9 +1931,9 @@ TEST_F(DeviceTests, givenNewUsmPoolingEnabledWhenDeviceInitializedThenUsmMemAllo
19301931
TEST(DeviceWithoutAILTest, givenNoAILWhenCreateDeviceThenDeviceIsCreated) {
19311932
DebugManagerStateRestore dbgRestorer;
19321933
debugManager.flags.EnableAIL.set(false);
1933-
1934+
MockReleaseHelper mockReleaseHelper;
19341935
auto hwInfo = *defaultHwInfo;
1935-
setupDefaultFeatureTableAndWorkaroundTable(&hwInfo);
1936+
setupDefaultFeatureTableAndWorkaroundTable(&hwInfo, mockReleaseHelper);
19361937
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
19371938

19381939
EXPECT_NE(nullptr, device.get());

shared/test/unit_test/helpers/hw_info_tests.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "shared/source/helpers/hw_info.h"
9+
#include "shared/test/common/mocks/mock_release_helper.h"
910
#include "shared/test/common/test_macros/test.h"
1011

1112
using namespace NEO;
@@ -14,6 +15,7 @@ TEST(HwInfoTest, whenSettingDefaultFeatureTableAndWorkaroundTableThenProperField
1415
HardwareInfo hwInfo{};
1516
FeatureTable expectedFeatureTable{};
1617
WorkaroundTable expectedWorkaroundTable{};
18+
MockReleaseHelper mockReleaseHelper;
1719

1820
expectedFeatureTable.flags.ftrAstcHdr2D = true;
1921
expectedFeatureTable.flags.ftrAstcLdr2D = true;
@@ -34,7 +36,7 @@ TEST(HwInfoTest, whenSettingDefaultFeatureTableAndWorkaroundTableThenProperField
3436

3537
expectedWorkaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface = true;
3638

37-
setupDefaultFeatureTableAndWorkaroundTable(&hwInfo);
39+
setupDefaultFeatureTableAndWorkaroundTable(&hwInfo, mockReleaseHelper);
3840

3941
EXPECT_EQ(expectedFeatureTable.asHash(), hwInfo.featureTable.asHash());
4042
EXPECT_EQ(expectedWorkaroundTable.asHash(), hwInfo.workaroundTable.asHash());

0 commit comments

Comments
 (0)