Skip to content

Commit 3a082c9

Browse files
fix: adjust wmtp feature flag in configureHardwareCustom method
this allows to adjust the flag independently on driver model type Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent 8000133 commit 3a082c9

File tree

8 files changed

+40
-10
lines changed

8 files changed

+40
-10
lines changed

shared/source/xe2_hpg_core/hw_info_bmg.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "shared/source/xe2_hpg_core/hw_cmds_bmg.h"
1616

1717
#include "aubstream/engine_node.h"
18-
#include "wmtp_setup_bmg.inl"
1918

2019
namespace NEO {
2120

@@ -95,7 +94,7 @@ void BMG::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
9594
featureTable->flags.ftrFlatPhysCCS = true;
9695
featureTable->flags.ftrE2ECompression = true;
9796
featureTable->flags.ftrTile64Optimization = true;
98-
featureTable->flags.ftrWalkerMTP = wmtpSupported;
97+
featureTable->flags.ftrWalkerMTP = true;
9998
featureTable->flags.ftrXe2Compression = true;
10099
featureTable->flags.ftrXe2PlusTiling = true;
101100
featureTable->flags.ftrL3TransientDataFlush = true;

shared/source/xe2_hpg_core/hw_info_lnl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "shared/source/xe2_hpg_core/hw_cmds_lnl.h"
1616

1717
#include "aubstream/engine_node.h"
18-
#include "wmtp_setup_lnl.inl"
1918

2019
namespace NEO {
2120

@@ -93,7 +92,7 @@ void LNL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
9392
featureTable->flags.ftrFlatPhysCCS = true;
9493
featureTable->flags.ftrE2ECompression = true;
9594
featureTable->flags.ftrTile64Optimization = true;
96-
featureTable->flags.ftrWalkerMTP = wmtpSupported;
95+
featureTable->flags.ftrWalkerMTP = true;
9796
featureTable->flags.ftrXe2Compression = true;
9897
featureTable->flags.ftrXe2PlusTiling = true;
9998
featureTable->flags.ftrPml5Support = true;

shared/source/xe2_hpg_core/linux/product_helper_bmg.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ constexpr static auto gfxProduct = IGFX_BMG;
1919
#include "shared/source/xe2_hpg_core/bmg/os_agnostic_product_helper_bmg.inl"
2020
#include "shared/source/xe2_hpg_core/os_agnostic_product_helper_xe2_hpg_core.inl"
2121

22+
#include "wmtp_setup_bmg.inl"
23+
2224
namespace NEO {
2325
#include "shared/source/os_interface/linux/product_helper_xe_hpc_and_later.inl"
2426

@@ -27,6 +29,7 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
2729
enableCompression(hwInfo);
2830

2931
hwInfo->featureTable.flags.ftr57bGPUAddressing = (hwInfo->capabilityTable.gpuAddressSpace == maxNBitValue(57));
32+
hwInfo->featureTable.flags.ftrWalkerMTP &= wmtpSupported;
3033

3134
enableBlitterOperationsSupport(hwInfo);
3235

shared/source/xe2_hpg_core/linux/product_helper_lnl.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ constexpr static auto gfxProduct = IGFX_LUNARLAKE;
2020
#include "shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl"
2121
#include "shared/source/xe2_hpg_core/os_agnostic_product_helper_xe2_hpg_core.inl"
2222

23+
#include "wmtp_setup_lnl.inl"
24+
2325
namespace NEO {
2426

2527
#include "shared/source/os_interface/linux/product_helper_xe_hpc_and_later.inl"
@@ -29,6 +31,7 @@ int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, O
2931
enableCompression(hwInfo);
3032

3133
hwInfo->featureTable.flags.ftr57bGPUAddressing = (hwInfo->capabilityTable.gpuAddressSpace == maxNBitValue(57));
34+
hwInfo->featureTable.flags.ftrWalkerMTP &= wmtpSupported;
3235

3336
enableBlitterOperationsSupport(hwInfo);
3437

shared/test/unit_test/xe2_hpg_core/bmg/hw_info_tests_bmg.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
1818
#include "shared/test/common/test_macros/test.h"
1919

20-
#include "wmtp_setup_bmg.inl"
21-
2220
using namespace NEO;
2321

2422
using BmgHwInfoTest = ::testing::Test;
@@ -65,7 +63,7 @@ BMGTEST_F(BmgHwInfoTest, givenBoolWhenCallBmgHardwareInfoSetupThenFeatureTableAn
6563
EXPECT_FALSE(featureTable.flags.ftrTileY);
6664
EXPECT_FALSE(featureTable.flags.ftrMultiTileArch);
6765
EXPECT_EQ(1u, featureTable.ftrBcsInfo.to_ulong());
68-
EXPECT_EQ(wmtpSupported && setParamBool, featureTable.flags.ftrWalkerMTP);
66+
EXPECT_EQ(setParamBool, featureTable.flags.ftrWalkerMTP);
6967
EXPECT_EQ(setParamBool, featureTable.flags.ftrXe2Compression);
7068
EXPECT_EQ(setParamBool, featureTable.flags.ftrXe2PlusTiling);
7169
EXPECT_EQ(setParamBool, featureTable.flags.ftrL3TransientDataFlush);

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h"
1515

1616
#include "per_product_test_definitions.h"
17+
#include "wmtp_setup_bmg.inl"
1718

1819
using namespace NEO;
1920

@@ -32,6 +33,20 @@ BMGTEST_F(BmgProductHelperLinux, WhenConfiguringHwInfoThenZeroIsReturned) {
3233
EXPECT_EQ(0, ret);
3334
}
3435

36+
BMGTEST_F(BmgProductHelperLinux, whenConfiguringHwInfoThenWmtpFlagIsAdjusted) {
37+
38+
outHwInfo.featureTable.flags.ftrWalkerMTP = false;
39+
int ret = productHelper->configureHardwareCustom(&outHwInfo, osInterface);
40+
EXPECT_EQ(0, ret);
41+
42+
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrWalkerMTP);
43+
44+
outHwInfo.featureTable.flags.ftrWalkerMTP = true;
45+
ret = productHelper->configureHardwareCustom(&outHwInfo, osInterface);
46+
EXPECT_EQ(0, ret);
47+
EXPECT_EQ(wmtpSupported, outHwInfo.featureTable.flags.ftrWalkerMTP);
48+
}
49+
3550
BMGTEST_F(BmgProductHelperLinux, given57bAddressSpaceWhenConfiguringHwInfoThenSetFtrFlag) {
3651

3752
outHwInfo.featureTable.flags.ftr57bGPUAddressing = false;

shared/test/unit_test/xe2_hpg_core/lnl/hw_info_tests_lnl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
1818
#include "shared/test/common/test_macros/test.h"
1919

20-
#include "wmtp_setup_lnl.inl"
21-
2220
using namespace NEO;
2321

2422
using LnlHwInfoTest = ::testing::Test;
@@ -67,7 +65,7 @@ LNLTEST_F(LnlHwInfoTest, givenBoolWhenCallLnlHardwareInfoSetupThenFeatureTableAn
6765
EXPECT_EQ(setParamBool, featureTable.flags.ftrXe2PlusTiling);
6866
EXPECT_EQ(setParamBool, featureTable.flags.ftrPml5Support);
6967
EXPECT_EQ(false, featureTable.flags.ftrTileY);
70-
EXPECT_EQ(wmtpSupported && setParamBool, featureTable.flags.ftrWalkerMTP);
68+
EXPECT_EQ(setParamBool, featureTable.flags.ftrWalkerMTP);
7169
EXPECT_EQ(setParamBool, workaroundTable.flags.wa4kAlignUVOffsetNV12LinearSurface);
7270
EXPECT_EQ(1u, featureTable.ftrBcsInfo.to_ulong());
7371
}

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h"
1515

1616
#include "per_product_test_definitions.h"
17+
#include "wmtp_setup_lnl.inl"
1718

1819
using namespace NEO;
1920

@@ -32,6 +33,20 @@ LNLTEST_F(LnlProductHelperLinux, WhenConfiguringHwInfoThenZeroIsReturned) {
3233
EXPECT_EQ(0, ret);
3334
}
3435

36+
LNLTEST_F(LnlProductHelperLinux, whenConfiguringHwInfoThenWmtpFlagIsAdjusted) {
37+
38+
outHwInfo.featureTable.flags.ftrWalkerMTP = false;
39+
int ret = productHelper->configureHardwareCustom(&outHwInfo, osInterface);
40+
EXPECT_EQ(0, ret);
41+
42+
EXPECT_FALSE(outHwInfo.featureTable.flags.ftrWalkerMTP);
43+
44+
outHwInfo.featureTable.flags.ftrWalkerMTP = true;
45+
ret = productHelper->configureHardwareCustom(&outHwInfo, osInterface);
46+
EXPECT_EQ(0, ret);
47+
EXPECT_EQ(wmtpSupported, outHwInfo.featureTable.flags.ftrWalkerMTP);
48+
}
49+
3550
LNLTEST_F(LnlProductHelperLinux, given57bAddressSpaceWhenConfiguringHwInfoThenSetFtrFlag) {
3651

3752
outHwInfo.featureTable.flags.ftr57bGPUAddressing = false;

0 commit comments

Comments
 (0)