Skip to content

Commit 4f9ff82

Browse files
fix: remove unnecesarry WA for DG2 compression
Related-To: NEO-9465 Signed-off-by: Jaroslaw Warchulski <[email protected]> Source: 62baf28
1 parent 9d37e7b commit 4f9ff82

10 files changed

+11
-67
lines changed

shared/source/os_interface/product_helper.h

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ class ProductHelper {
108108
virtual bool isDefaultEngineTypeAdjustmentRequired(const HardwareInfo &hwInfo) const = 0;
109109
virtual bool overrideGfxPartitionLayoutForWsl() const = 0;
110110
virtual bool isDisableOverdispatchAvailable(const HardwareInfo &hwInfo) const = 0;
111-
virtual bool allowCompression(const HardwareInfo &hwInfo) const = 0;
112111
virtual LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
113112
virtual bool isNewResidencyModelSupported() const = 0;
114113
virtual bool isDirectSubmissionSupported(ReleaseHelper *releaseHelper) const = 0;

shared/source/os_interface/product_helper.inl

-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "shared/source/helpers/preamble.h"
2222
#include "shared/source/helpers/string_helpers.h"
2323
#include "shared/source/kernel/kernel_descriptor.h"
24-
#include "shared/source/kernel/kernel_properties.h"
2524
#include "shared/source/memory_manager/allocation_properties.h"
2625
#include "shared/source/memory_manager/graphics_allocation.h"
2726
#include "shared/source/memory_manager/memory_manager.h"
@@ -35,7 +34,6 @@
3534
#include "ocl_igc_shared/indirect_access_detection/version.h"
3635

3736
#include <bitset>
38-
#include <limits>
3937

4038
namespace NEO {
4139

@@ -305,11 +303,6 @@ bool ProductHelperHw<gfxProduct>::isDisableOverdispatchAvailable(const HardwareI
305303
return getFrontEndPropertyDisableOverDispatchSupport();
306304
}
307305

308-
template <PRODUCT_FAMILY gfxProduct>
309-
bool ProductHelperHw<gfxProduct>::allowCompression(const HardwareInfo &hwInfo) const {
310-
return true;
311-
}
312-
313306
template <PRODUCT_FAMILY gfxProduct>
314307
LocalMemoryAccessMode ProductHelperHw<gfxProduct>::getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
315308
return LocalMemoryAccessMode::defaultMode;

shared/source/os_interface/product_helper_hw.h

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class ProductHelperHw : public ProductHelper {
4747
std::optional<aub_stream::ProductFamily> getAubStreamProductFamily() const override;
4848
bool isDefaultEngineTypeAdjustmentRequired(const HardwareInfo &hwInfo) const override;
4949
bool isDisableOverdispatchAvailable(const HardwareInfo &hwInfo) const override;
50-
bool allowCompression(const HardwareInfo &hwInfo) const override;
5150
LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
5251
bool isNewResidencyModelSupported() const override;
5352
bool isDirectSubmissionSupported(ReleaseHelper *releaseHelper) const override;

shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl

-8
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,6 @@ bool ProductHelperHw<gfxProduct>::isDisableOverdispatchAvailable(const HardwareI
113113
return true;
114114
}
115115

116-
template <>
117-
bool ProductHelperHw<gfxProduct>::allowCompression(const HardwareInfo &hwInfo) const {
118-
if (DG2::isG10(hwInfo) && GfxCoreHelper::isWorkaroundRequired(REVISION_A0, REVISION_A1, hwInfo, *this)) {
119-
return false;
120-
}
121-
return true;
122-
}
123-
124116
template <>
125117
LocalMemoryAccessMode ProductHelperHw<gfxProduct>::getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
126118
if (DG2::isG10(hwInfo) && GfxCoreHelper::isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo, *this)) {

shared/source/xe_hpg_core/linux/product_helper_dg2.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ namespace NEO {
2121

2222
template <>
2323
int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
24-
if (allowCompression(*hwInfo)) {
25-
enableCompression(hwInfo);
26-
}
27-
24+
enableCompression(hwInfo);
2825
enableBlitterOperationsSupport(hwInfo);
2926

3027
hwInfo->workaroundTable.flags.wa_15010089951 = true;

shared/source/xe_hpg_core/windows/product_helper_dg2.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ bool ProductHelperHw<gfxProduct>::isDirectSubmissionSupported(ReleaseHelper *rel
2525

2626
template <>
2727
int ProductHelperHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
28-
if (allowCompression(*hwInfo)) {
29-
enableCompression(hwInfo);
30-
}
28+
enableCompression(hwInfo);
3129
enableBlitterOperationsSupport(hwInfo);
3230

3331
hwInfo->workaroundTable.flags.wa_15010089951 = true;

shared/test/common/mocks/mock_product_helper.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ bool ProductHelperHw<IGFX_UNKNOWN>::isDisableOverdispatchAvailable(const Hardwar
153153
return false;
154154
}
155155

156-
template <>
157-
bool ProductHelperHw<IGFX_UNKNOWN>::allowCompression(const HardwareInfo &hwInfo) const {
158-
return false;
159-
}
160-
161156
template <>
162157
bool ProductHelperHw<IGFX_UNKNOWN>::isDirectSubmissionSupported(ReleaseHelper *releaseHelper) const {
163158
return false;

shared/test/unit_test/os_interface/product_helper_tests.cpp

+3-10
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,31 @@
88
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
99

1010
#include "shared/source/aub_mem_dump/aub_mem_dump.h"
11+
#include "shared/source/debug_settings/debug_settings_manager.h"
12+
#include "shared/source/helpers/constants.h"
13+
#include "shared/source/helpers/definitions/engine_group_types.h"
1114
#include "shared/source/helpers/definitions/indirect_detection_versions.h"
12-
#include "shared/source/helpers/gfx_core_helper.h"
1315
#include "shared/source/helpers/local_memory_access_modes.h"
1416
#include "shared/source/kernel/kernel_descriptor.h"
1517
#include "shared/source/memory_manager/allocation_type.h"
1618
#include "shared/source/os_interface/product_helper.h"
1719
#include "shared/source/release_helper/release_helper.h"
1820
#include "shared/source/unified_memory/usm_memory_support.h"
19-
#include "shared/test/common/fixtures/device_fixture.h"
2021
#include "shared/test/common/helpers/debug_manager_state_restore.h"
21-
#include "shared/test/common/helpers/gtest_helpers.h"
2222
#include "shared/test/common/helpers/mock_product_helper_hw.h"
2323
#include "shared/test/common/helpers/unit_test_helper.h"
2424
#include "shared/test/common/mocks/mock_command_stream_receiver.h"
2525
#include "shared/test/common/mocks/mock_device.h"
2626
#include "shared/test/common/mocks/mock_execution_environment.h"
2727
#include "shared/test/common/mocks/mock_gmm.h"
2828
#include "shared/test/common/mocks/mock_graphics_allocation.h"
29-
#include "shared/test/common/mocks/mock_product_helper.h"
3029
#include "shared/test/common/test_macros/hw_test.h"
3130

3231
#include "clos_matchers.h"
3332
#include "gtest/gtest.h"
3433
#include "ocl_igc_shared/indirect_access_detection/version.h"
3534
#include "test_traits_common.h"
3635

37-
#include <limits>
3836
using namespace NEO;
3937

4038
ProductHelperTest::ProductHelperTest() {
@@ -364,11 +362,6 @@ HWCMDTEST_F(IGFX_GEN12LP_CORE, ProductHelperTest, givenProductHelperWhenAddition
364362
EXPECT_FALSE(productHelper->isDisableOverdispatchAvailable(pInHwInfo));
365363
}
366364

367-
HWTEST_F(ProductHelperTest, WhenAllowRenderCompressionIsCalledThenTrueIsReturned) {
368-
369-
EXPECT_TRUE(productHelper->allowCompression(pInHwInfo));
370-
}
371-
372365
HWTEST_F(ProductHelperTest, givenVariousDebugKeyValuesWhenGettingLocalMemoryAccessModeThenCorrectValueIsReturned) {
373366
DebugManagerStateRestore restore{};
374367

shared/test/unit_test/xe_hpg_core/dg2/excludes_xe_hpg_core_dg2.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2022-2024 Intel Corporation
2+
* Copyright (C) 2022-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -11,7 +11,6 @@ HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenHardwareInfoWhenCallingIsAddition
1111
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenHardwareInfoWhenCallingIsMaxThreadsForWorkgroupWARequiredThenFalseIsReturned, IGFX_DG2);
1212
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedForDefaultEngineTypeAdjustmentThenFalseIsReturned, IGFX_DG2);
1313
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfTile64With3DSurfaceOnBCSIsSupportedThenTrueIsReturned, IGFX_DG2);
14-
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, WhenAllowRenderCompressionIsCalledThenTrueIsReturned, IGFX_DG2);
1514
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfStorageInfoAdjustmentIsRequiredThenFalseIsReturned, IGFX_DG2);
1615
HWTEST_EXCLUDE_PRODUCT(CompilerProductHelperFixture, givenAtLeastXeHpgCoreWhenGetCachingPolicyOptionsThenReturnWriteByPassPolicyOption_IsAtLeastXeHpgCore, IGFX_DG2);
1716
HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenGetL1CachePolicyThenReturnWriteByPass_IsAtLeastXeHpgCore, IGFX_DG2);

shared/test/unit_test/xe_hpg_core/dg2/product_config_helper_tests_dg2.cpp

+5-26
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@
66
*/
77

88
#include "shared/source/command_stream/stream_properties.h"
9+
#include "shared/source/debug_settings/debug_settings_manager.h"
910
#include "shared/source/execution_environment/execution_environment.h"
1011
#include "shared/source/execution_environment/root_device_environment.h"
1112
#include "shared/source/helpers/compiler_product_helper.h"
1213
#include "shared/source/helpers/constants.h"
1314
#include "shared/source/helpers/gfx_core_helper.h"
1415
#include "shared/source/helpers/product_config_helper.h"
1516
#include "shared/source/os_interface/product_helper.h"
16-
#include "shared/source/release_helper/release_helper.h"
1717
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
18-
#include "shared/test/common/fixtures/device_fixture.h"
1918
#include "shared/test/common/helpers/debug_manager_state_restore.h"
20-
#include "shared/test/common/mocks/mock_command_stream_receiver.h"
21-
#include "shared/test/common/mocks/mock_device.h"
19+
#include "shared/test/common/helpers/default_hw_info.h"
2220
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
23-
#include "shared/test/common/test_macros/test.h"
2421
#include "shared/test/unit_test/fixtures/product_config_fixture.h"
2522
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
2623

2724
#include "aubstream/product_family.h"
25+
#include "gtest/gtest.h"
2826
#include "platforms.h"
2927

28+
#include <array>
29+
3030
using namespace NEO;
3131
using ProductConfigHelperDg2Tests = ::testing::Test;
3232
using ProductHelperTestDg2 = ProductHelperTest;
@@ -520,27 +520,6 @@ DG2TEST_F(ProductHelperTestDg2, givenB0rCSteppingWhenAskingIfTile64With3DSurface
520520
}
521521
}
522522

523-
DG2TEST_F(ProductHelperTestDg2, givenDg2G10A0WhenConfigureCalledThenDisableCompression) {
524-
525-
for (uint8_t revision : {REVISION_A0, REVISION_A1}) {
526-
for (auto deviceId : {dg2G10DeviceIds[0], dg2G11DeviceIds[0], dg2G12DeviceIds[0]}) {
527-
HardwareInfo hwInfo = *defaultHwInfo;
528-
hwInfo.featureTable.flags.ftrE2ECompression = true;
529-
530-
hwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(revision, hwInfo);
531-
hwInfo.platform.usDeviceID = deviceId;
532-
533-
productHelper->configureHardwareCustom(&hwInfo, nullptr);
534-
535-
auto compressionExpected = DG2::isG10(hwInfo) ? (revision != REVISION_A0) : true;
536-
537-
EXPECT_EQ(compressionExpected, hwInfo.capabilityTable.ftrRenderCompressedBuffers);
538-
EXPECT_EQ(compressionExpected, hwInfo.capabilityTable.ftrRenderCompressedImages);
539-
EXPECT_EQ(compressionExpected, productHelper->allowCompression(hwInfo));
540-
}
541-
}
542-
}
543-
544523
DG2TEST_F(ProductHelperTestDg2, givenDg2G10WhenAskingForTile64For3dSurfaceOnBcsSupportThenReturnSuccessOnlyForCStepping) {
545524

546525
for (uint8_t revision : {REVISION_A0, REVISION_A1, REVISION_B, REVISION_C}) {

0 commit comments

Comments
 (0)