mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Apply basic WA only for multi CCS on DG2
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
f45d1029e3
commit
5a2f00d295
@ -186,23 +186,15 @@ HWTEST2_F(CommandStreamReceiverFlushTaskXeHPAndLaterTests, givenProgramPipeContr
|
||||
parseCommands<FamilyType>(commandStreamReceiver.getCS(0));
|
||||
|
||||
auto requiredCmdSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*pDevice, false);
|
||||
auto cmdSize = sizeof(STATE_SIP) + sizeof(PIPE_CONTROL);
|
||||
auto cmdSize = sizeof(STATE_SIP);
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(*defaultHwInfo, commandStreamReceiver.isRcs());
|
||||
std::ignore = isExtendedWARequired;
|
||||
if (isBasicWARequired) {
|
||||
cmdSize += sizeof(PIPE_CONTROL);
|
||||
}
|
||||
EXPECT_EQ(cmdSize, requiredCmdSize);
|
||||
|
||||
// first PC prior SBA
|
||||
auto pipeControlIterator = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
pipeControlIterator = find<PIPE_CONTROL *>(++pipeControlIterator, cmdList.end());
|
||||
auto pipeControlCmd = genCmdCast<PIPE_CONTROL *>(*pipeControlIterator);
|
||||
|
||||
EXPECT_TRUE(UnitTestHelper<FamilyType>::getPipeControlHdcPipelineFlush(*pipeControlCmd));
|
||||
EXPECT_TRUE(pipeControlCmd->getUnTypedDataPortCacheFlush());
|
||||
|
||||
EXPECT_FALSE(pipeControlCmd->getAmfsFlushEnable());
|
||||
EXPECT_FALSE(pipeControlCmd->getInstructionCacheInvalidateEnable());
|
||||
EXPECT_FALSE(pipeControlCmd->getTextureCacheInvalidationEnable());
|
||||
EXPECT_FALSE(pipeControlCmd->getConstantCacheInvalidationEnable());
|
||||
EXPECT_FALSE(pipeControlCmd->getStateCacheInvalidationEnable());
|
||||
|
||||
auto sipIterator = find<STATE_SIP *>(cmdList.begin(), cmdList.end());
|
||||
auto sipCmd = genCmdCast<STATE_SIP *>(*sipIterator);
|
||||
|
||||
|
@ -136,14 +136,13 @@ bool HwInfoConfigHw<gfxProduct>::isPrefetchDisablingRequired(const HardwareInfo
|
||||
|
||||
template <>
|
||||
std::pair<bool, bool> HwInfoConfigHw<gfxProduct>::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs) const {
|
||||
auto isBasicWARequired = true;
|
||||
auto isExtendedWARequired = hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1 && !isRcs;
|
||||
auto waRequired = hwInfo.gtSystemInfo.CCSInfo.NumberOfCCSEnabled > 1 && !isRcs;
|
||||
|
||||
if (DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get() != -1) {
|
||||
isExtendedWARequired = DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get();
|
||||
waRequired = DebugManager.flags.ProgramExtendedPipeControlPriorToNonPipelinedStateCommand.get();
|
||||
}
|
||||
|
||||
return {isBasicWARequired, isExtendedWARequired};
|
||||
return {waRequired, waRequired};
|
||||
}
|
||||
|
||||
template <>
|
||||
|
@ -106,7 +106,13 @@ XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, givenComputeModeCmdSizeWhenL
|
||||
overrideComputeModeRequest<FamilyType>(false, false, false, false, 128u);
|
||||
EXPECT_FALSE(getCsrHw<FamilyType>()->streamProperties.stateComputeMode.isDirty());
|
||||
|
||||
auto cmdSize = sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL);
|
||||
auto cmdSize = sizeof(STATE_COMPUTE_MODE);
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(*defaultHwInfo, getCsrHw<FamilyType>()->isRcs());
|
||||
std::ignore = isExtendedWARequired;
|
||||
if (isBasicWARequired) {
|
||||
cmdSize += sizeof(PIPE_CONTROL);
|
||||
}
|
||||
|
||||
overrideComputeModeRequest<FamilyType>(false, false, false, true, 256u);
|
||||
auto retSize = getCsrHw<FamilyType>()->getCmdSizeForComputeMode();
|
||||
@ -130,7 +136,13 @@ XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, givenCoherencyWithSharedHand
|
||||
overrideComputeModeRequest<FamilyType>(false, true, true);
|
||||
EXPECT_FALSE(getCsrHw<FamilyType>()->streamProperties.stateComputeMode.isDirty());
|
||||
|
||||
auto cmdsSize = sizeof(STATE_COMPUTE_MODE) + (2 * sizeof(PIPE_CONTROL));
|
||||
auto cmdsSize = sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL);
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(*defaultHwInfo, getCsrHw<FamilyType>()->isRcs());
|
||||
std::ignore = isExtendedWARequired;
|
||||
if (isBasicWARequired) {
|
||||
cmdsSize += sizeof(PIPE_CONTROL);
|
||||
}
|
||||
|
||||
overrideComputeModeRequest<FamilyType>(true, true, true);
|
||||
auto retSize = getCsrHw<FamilyType>()->getCmdSizeForComputeMode();
|
||||
@ -148,7 +160,13 @@ XE_HPG_CORETEST_F(ComputeModeRequirementsXeHpgCore, givenCoherencyWithoutSharedH
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
setUpImpl<FamilyType>();
|
||||
|
||||
auto cmdsSize = sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL);
|
||||
auto cmdsSize = sizeof(STATE_COMPUTE_MODE);
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(*defaultHwInfo, getCsrHw<FamilyType>()->isRcs());
|
||||
std::ignore = isExtendedWARequired;
|
||||
if (isBasicWARequired) {
|
||||
cmdsSize += sizeof(PIPE_CONTROL);
|
||||
}
|
||||
|
||||
overrideComputeModeRequest<FamilyType>(false, false, false, false);
|
||||
EXPECT_FALSE(getCsrHw<FamilyType>()->streamProperties.stateComputeMode.isDirty());
|
||||
|
@ -123,7 +123,7 @@ HWTEST2_F(ComputeModeRequirements, GivenSingleCCSEnabledSetupThenCorrectCommands
|
||||
using FORCE_NON_COHERENT = typename STATE_COMPUTE_MODE::FORCE_NON_COHERENT;
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
auto cmdsSize = sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL);
|
||||
auto cmdsSize = sizeof(STATE_COMPUTE_MODE);
|
||||
char buff[1024] = {0};
|
||||
LinearStream stream(buff, 1024);
|
||||
|
||||
@ -144,19 +144,7 @@ HWTEST2_F(ComputeModeRequirements, GivenSingleCCSEnabledSetupThenCorrectCommands
|
||||
HardwareParse hwParser;
|
||||
hwParser.parseCommands<FamilyType>(stream, startOffset);
|
||||
|
||||
auto pipeControlIterator = find<PIPE_CONTROL *>(hwParser.cmdList.begin(), hwParser.cmdList.end());
|
||||
auto pipeControlCmd = genCmdCast<PIPE_CONTROL *>(*pipeControlIterator);
|
||||
|
||||
EXPECT_TRUE(UnitTestHelper<FamilyType>::getPipeControlHdcPipelineFlush(*pipeControlCmd));
|
||||
EXPECT_TRUE(pipeControlCmd->getUnTypedDataPortCacheFlush());
|
||||
|
||||
EXPECT_FALSE(pipeControlCmd->getAmfsFlushEnable());
|
||||
EXPECT_FALSE(pipeControlCmd->getInstructionCacheInvalidateEnable());
|
||||
EXPECT_FALSE(pipeControlCmd->getTextureCacheInvalidationEnable());
|
||||
EXPECT_FALSE(pipeControlCmd->getConstantCacheInvalidationEnable());
|
||||
EXPECT_FALSE(pipeControlCmd->getStateCacheInvalidationEnable());
|
||||
|
||||
auto stateComputeModeCmd = reinterpret_cast<STATE_COMPUTE_MODE *>(ptrOffset(stream.getCpuBase(), sizeof(PIPE_CONTROL)));
|
||||
auto stateComputeModeCmd = reinterpret_cast<STATE_COMPUTE_MODE *>(stream.getCpuBase());
|
||||
EXPECT_TRUE(isValueSet(stateComputeModeCmd->getMaskBits(), expectedBitsMask));
|
||||
expectedScmCmd.setMaskBits(stateComputeModeCmd->getMaskBits());
|
||||
EXPECT_TRUE(memcmp(&expectedScmCmd, stateComputeModeCmd, sizeof(STATE_COMPUTE_MODE)) == 0);
|
||||
|
@ -190,7 +190,7 @@ DG2TEST_F(HwInfoConfigTestDg2, givenProgramPipeControlPriorToNonPipelinedStateCo
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs);
|
||||
|
||||
EXPECT_FALSE(isExtendedWARequired);
|
||||
EXPECT_TRUE(isBasicWARequired);
|
||||
EXPECT_FALSE(isBasicWARequired);
|
||||
}
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, givenHwInfoConfigWithMultipleCSSWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnCcsThenTrueIsReturned) {
|
||||
@ -214,7 +214,7 @@ DG2TEST_F(HwInfoConfigTestDg2, givenHwInfoConfigWithMultipleCSSWhenIsPipeControl
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs);
|
||||
|
||||
EXPECT_FALSE(isExtendedWARequired);
|
||||
EXPECT_TRUE(isBasicWARequired);
|
||||
EXPECT_FALSE(isBasicWARequired);
|
||||
}
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, givenHwInfoConfigWithSingleCSSWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnCcsThenTrueIsReturned) {
|
||||
@ -226,7 +226,7 @@ DG2TEST_F(HwInfoConfigTestDg2, givenHwInfoConfigWithSingleCSSWhenIsPipeControlPr
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs);
|
||||
|
||||
EXPECT_FALSE(isExtendedWARequired);
|
||||
EXPECT_TRUE(isBasicWARequired);
|
||||
EXPECT_FALSE(isBasicWARequired);
|
||||
}
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, givenHwInfoConfigWithSingleCSSWhenIsPipeControlPriorToNonPipelinedStateCommandsWARequiredIsCalledOnRcsThenTrueIsReturned) {
|
||||
@ -238,7 +238,7 @@ DG2TEST_F(HwInfoConfigTestDg2, givenHwInfoConfigWithSingleCSSWhenIsPipeControlPr
|
||||
const auto &[isBasicWARequired, isExtendedWARequired] = hwInfoConfig.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs);
|
||||
|
||||
EXPECT_FALSE(isExtendedWARequired);
|
||||
EXPECT_TRUE(isBasicWARequired);
|
||||
EXPECT_FALSE(isBasicWARequired);
|
||||
}
|
||||
|
||||
DG2TEST_F(HwInfoConfigTestDg2, givenDg2WhenIsBlitterForImagesSupportedIsCalledThenTrueIsReturned) {
|
||||
|
Reference in New Issue
Block a user