Skip to content

Commit 700fad6

Browse files
Correct stepping usage
Signed-off-by: Filip Hazubski <[email protected]>
1 parent 3d4b450 commit 700fad6

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

opencl/test/unit_test/gen12lp/device_queue_tests_gen12lp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ GEN12LPTEST_F(DeviceQueueHwTest, givenDeviceQueueWhenRunningOnCCsThenFfidSkipOff
2323
ASSERT_NE(nullptr, blockInfo->getGraphicsAllocation());
2424
const_cast<SPatchThreadPayload *>(blockInfo->patchInfo.threadPayload)->OffsetToSkipSetFFIDGP = 0x1234;
2525

26-
const_cast<HardwareInfo &>(device->getHardwareInfo()).platform.usRevId = REVISION_A0;
26+
auto &hwInfo = const_cast<HardwareInfo &>(device->getHardwareInfo());
27+
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
28+
hwInfo.platform.usRevId = hwHelper.getHwRevIdFromStepping(REVISION_A0, hwInfo);
2729

2830
uint64_t expectedOffset = blockInfo->getGraphicsAllocation()->getGpuAddressToPatch() + blockInfo->patchInfo.threadPayload->OffsetToSkipSetFFIDGP;
2931
uint64_t offset = MockDeviceQueueHw<FamilyType>::getBlockKernelStartPointer(device->getDevice(), blockInfo, true);
@@ -33,7 +35,7 @@ GEN12LPTEST_F(DeviceQueueHwTest, givenDeviceQueueWhenRunningOnCCsThenFfidSkipOff
3335
offset = MockDeviceQueueHw<FamilyType>::getBlockKernelStartPointer(device->getDevice(), blockInfo, false);
3436
EXPECT_EQ(expectedOffset, offset);
3537

36-
const_cast<HardwareInfo &>(device->getHardwareInfo()).platform.usRevId = REVISION_A0 + 1;
38+
hwInfo.platform.usRevId = hwHelper.getHwRevIdFromStepping(REVISION_A1, hwInfo);
3739

3840
expectedOffset = blockInfo->getGraphicsAllocation()->getGpuAddressToPatch();
3941
offset = MockDeviceQueueHw<FamilyType>::getBlockKernelStartPointer(device->getDevice(), blockInfo, true);

opencl/test/unit_test/gen12lp/dg1/hw_helper_tests_dg1.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@ DG1TEST_F(HwHelperTestDg1, givenDg1PlatformWhenSetupHardwareCapabilitiesIsCalled
3939
}
4040

4141
DG1TEST_F(HwHelperTestDg1, givenDg1A0WhenAdjustDefaultEngineTypeCalledThenRcsIsReturned) {
42+
auto &helper = HwHelper::get(renderCoreFamily);
4243
hardwareInfo.featureTable.ftrCCSNode = true;
43-
hardwareInfo.platform.usRevId = REVISION_A0;
44+
hardwareInfo.platform.usRevId = helper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
4445

45-
auto &helper = HwHelper::get(renderCoreFamily);
4646
helper.adjustDefaultEngineType(&hardwareInfo);
4747
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
4848
}
4949

5050
DG1TEST_F(HwHelperTestDg1, givenDg1BWhenAdjustDefaultEngineTypeCalledThenCcsIsReturned) {
51+
auto &helper = HwHelper::get(renderCoreFamily);
5152
hardwareInfo.featureTable.ftrCCSNode = true;
52-
hardwareInfo.platform.usRevId = REVISION_B;
53+
hardwareInfo.platform.usRevId = helper.getHwRevIdFromStepping(REVISION_B, hardwareInfo);
5354

54-
auto &helper = HwHelper::get(renderCoreFamily);
5555
helper.adjustDefaultEngineType(&hardwareInfo);
5656
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
5757
}

opencl/test/unit_test/gen12lp/hw_helper_tests_gen12lp.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenGen12LpSkuWhenGettingCapabilityCoherency
4949
}
5050

5151
if (hardwareInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP) {
52-
hardwareInfo.platform.usRevId = 0x1;
52+
hardwareInfo.platform.usRevId = helper.getHwRevIdFromStepping(REVISION_A1, hardwareInfo);
5353
helper.setCapabilityCoherencyFlag(&hardwareInfo, coherency);
5454
EXPECT_TRUE(coherency);
55-
hardwareInfo.platform.usRevId = 0x0;
55+
hardwareInfo.platform.usRevId = helper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
5656
helper.setCapabilityCoherencyFlag(&hardwareInfo, coherency);
5757
EXPECT_FALSE(coherency);
5858
} else {

opencl/test/unit_test/gen12lp/tgllp/kernel_tests_tgllp.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ TGLLPTEST_F(KernelTgllpTests, GivenUseOffsetToSkipSetFFIDGPWorkaroundActiveWhenS
2222
SPatchThreadPayload threadPayload{};
2323
threadPayload.OffsetToSkipSetFFIDGP = additionalOffsetDueToFfid;
2424
auto hwInfo = *defaultHwInfo;
25+
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
2526

26-
unsigned short steppings[] = {REVISION_A0, REVISION_A0 + 1};
27+
unsigned short steppings[] = {REVISION_A0, REVISION_A1};
2728
for (auto stepping : steppings) {
2829

29-
hwInfo.platform.usRevId = stepping;
30+
hwInfo.platform.usRevId = hwHelper.getHwRevIdFromStepping(stepping, hwInfo);
3031
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
3132
auto rootDeviceIndex = device->getRootDeviceIndex();
3233
MockKernelWithInternals mockKernelWithInternals{*device};

opencl/test/unit_test/gen12lp/tgllp/test_hw_helper_tgllp.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2019-2020 Intel Corporation
2+
* Copyright (C) 2019-2021 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -12,26 +12,29 @@
1212
using HwHelperTestGen12Lp = HwHelperTest;
1313

1414
TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllpA0WhenAdjustDefaultEngineTypeCalledThenRcsIsReturned) {
15+
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
1516
hardwareInfo.featureTable.ftrCCSNode = true;
16-
hardwareInfo.platform.usRevId = REVISION_A0;
17+
hardwareInfo.platform.usRevId = hwHelper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
1718

1819
auto &helper = HwHelper::get(renderCoreFamily);
1920
helper.adjustDefaultEngineType(&hardwareInfo);
2021
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
2122
}
2223

2324
TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllpBWhenAdjustDefaultEngineTypeCalledThenRcsIsReturned) {
25+
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
2426
hardwareInfo.featureTable.ftrCCSNode = true;
25-
hardwareInfo.platform.usRevId = REVISION_A0 + 1;
27+
hardwareInfo.platform.usRevId = hwHelper.getHwRevIdFromStepping(REVISION_A1, hardwareInfo);
2628

2729
auto &helper = HwHelper::get(renderCoreFamily);
2830
helper.adjustDefaultEngineType(&hardwareInfo);
2931
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
3032
}
3133

3234
TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllWhenWaForDefaultEngineIsNotAppliedThenCcsIsReturned) {
35+
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
3336
hardwareInfo.featureTable.ftrCCSNode = true;
34-
hardwareInfo.platform.usRevId = REVISION_A0;
37+
hardwareInfo.platform.usRevId = hwHelper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
3538
hardwareInfo.platform.eProductFamily = IGFX_UNKNOWN;
3639

3740
auto &helper = HwHelper::get(renderCoreFamily);
@@ -40,13 +43,15 @@ TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllWhenWaForDefaultEngineIsNotAppliedThen
4043
}
4144

4245
TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllpWhenSteppingBellowBThenIntegerDivisionEmulationIsEnabled) {
43-
hardwareInfo.platform.usRevId = REVISION_A0;
46+
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
47+
hardwareInfo.platform.usRevId = hwHelper.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
4448
auto &helper = HwHelper::get(renderCoreFamily);
4549
EXPECT_TRUE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
4650
}
4751

4852
TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllpWhenSteppingBThenIntegerDivisionEmulationIsEnabled) {
49-
hardwareInfo.platform.usRevId = REVISION_A0 + 1;
53+
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
54+
hardwareInfo.platform.usRevId = hwHelper.getHwRevIdFromStepping(REVISION_A1, hardwareInfo);
5055
auto &helper = HwHelper::get(renderCoreFamily);
5156
EXPECT_FALSE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
5257
}

0 commit comments

Comments
 (0)