fix: don't program dummy blit prior to MI ARB CHECK

Related-To: NEO-9996
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-02-27 14:36:13 +00:00
committed by Compute-Runtime-Automation
parent 9f01a831a2
commit b6b53daa3f
15 changed files with 46 additions and 69 deletions

View File

@@ -694,7 +694,7 @@ HWTEST_F(BcsTests, givenBlitPropertiesContainerWhenEstimatingCommandsSizeThenCal
waArgs.isWaRequired = false;
auto baseSize = EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs) + sizeof(typename FamilyType::MI_BATCH_BUFFER_END);
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -737,7 +737,7 @@ HWTEST_F(BcsTests, givenBlitPropertiesContainerWhenDirectsubmissionEnabledEstima
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
auto baseSize = EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs) + sizeof(typename FamilyType::MI_BATCH_BUFFER_START);
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -778,7 +778,7 @@ HWTEST_F(BcsTests, givenBlitPropertiesContainerWhenEstimatingCommandsSizeForWrit
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -820,7 +820,7 @@ HWTEST_F(BcsTests, givenBlitPropertiesContainerWhenDirectSubmissionEnabledEstima
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -858,7 +858,7 @@ HWTEST_F(BcsTests, givenTimestampPacketWriteRequestWhenEstimatingSizeForCommands
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t expectedBaseSize = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t expectedBaseSize = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
expectedBaseSize += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -884,7 +884,7 @@ HWTEST_F(BcsTests, givenTimestampPacketWriteRequestWhenEstimatingSizeForCommands
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t expectedBaseSize = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t expectedBaseSize = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
expectedBaseSize += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -920,7 +920,7 @@ HWTEST_F(BcsTests, givenBltSizeAndCsrDependenciesWhenEstimatingCommandSizeThenAd
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -952,7 +952,7 @@ HWTEST_F(BcsTests, givenBltSizeWithCsrDependenciesAndRelaxedOrderingWhenEstimati
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -977,7 +977,7 @@ HWTEST_F(BcsTests, givenImageAndBufferWhenEstimateBlitCommandSizeThenReturnCorre
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
auto expectedSize = EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
auto expectedSize = EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
expectedSize += isImage ? sizeof(typename FamilyType::XY_BLOCK_COPY_BLT) : sizeof(typename FamilyType::XY_COPY_BLT);
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {

View File

@@ -41,7 +41,7 @@ HWTEST_F(BcsTests, givenBltSizeWhenEstimatingCommandSizeThenAddAllRequiredComman
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -79,7 +79,7 @@ HWTEST_F(BcsTests, givenDebugCapabilityWhenEstimatingCommandSizeThenAddAllRequir
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -110,7 +110,7 @@ HWTEST_F(BcsTests, givenRelaxedOrderingEnabledWhenEstimatingCommandSizeThenAddAl
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -142,7 +142,7 @@ HWTEST_F(BcsTests, givenBltSizeWhenEstimatingCommandSizeForReadBufferRectThenAdd
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);
@@ -180,7 +180,7 @@ HWTEST_F(BcsTests, givenBltWithBigCopySizeWhenEstimatingCommandSizeForReadBuffer
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t cmdsSizePerBlit = sizeof(typename FamilyType::XY_COPY_BLT) + EncodeMiArbCheck<FamilyType>::getCommandSize() + dummyBlitWaSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
cmdsSizePerBlit += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);

View File

@@ -541,12 +541,10 @@ template <typename GfxFamily>
struct EncodeMiArbCheck {
using MI_ARB_CHECK = typename GfxFamily::MI_ARB_CHECK;
static void programWithWa(LinearStream &commandStream, std::optional<bool> preParserDisable, EncodeDummyBlitWaArgs &waArgs);
static size_t getCommandSizeWithWa(const EncodeDummyBlitWaArgs &waArgs);
protected:
static void program(LinearStream &commandStream, std::optional<bool> preParserDisable);
static size_t getCommandSize();
protected:
static void adjust(MI_ARB_CHECK &miArbCheck, std::optional<bool> preParserDisable);
};

View File

@@ -1041,17 +1041,6 @@ void EncodeMiArbCheck<Family>::program(LinearStream &commandStream, std::optiona
template <typename Family>
size_t EncodeMiArbCheck<Family>::getCommandSize() { return sizeof(MI_ARB_CHECK); }
template <typename Family>
void EncodeMiArbCheck<Family>::programWithWa(LinearStream &commandStream, std::optional<bool> preParserDisable, EncodeDummyBlitWaArgs &waArgs) {
BlitCommandsHelper<Family>::dispatchDummyBlit(commandStream, waArgs);
EncodeMiArbCheck<Family>::program(commandStream, preParserDisable);
}
template <typename Family>
size_t EncodeMiArbCheck<Family>::getCommandSizeWithWa(const EncodeDummyBlitWaArgs &waArgs) {
return EncodeMiArbCheck<Family>::getCommandSize() + BlitCommandsHelper<Family>::getDummyBlitSize(waArgs);
}
template <typename Family>
inline void EncodeNoop<Family>::alignToCacheLine(LinearStream &commandStream) {
auto used = commandStream.getUsed();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -11,12 +11,11 @@ namespace NEO {
template <typename GfxFamily>
size_t DebuggerL0Hw<GfxFamily>::getSbaTrackingCommandsSize(size_t trackedAddressCount) {
if (singleAddressSpaceSbaTracking) {
NEO::EncodeDummyBlitWaArgs waArgs{false};
constexpr uint32_t aluCmdSize = sizeof(typename GfxFamily::MI_MATH) + sizeof(typename GfxFamily::MI_MATH_ALU_INST_INLINE) * RegisterConstants::numAluInstForReadModifyWrite;
return 2 * (EncodeMiArbCheck<GfxFamily>::getCommandSizeWithWa(waArgs) + sizeof(typename GfxFamily::MI_BATCH_BUFFER_START)) +
return 2 * (EncodeMiArbCheck<GfxFamily>::getCommandSize() + sizeof(typename GfxFamily::MI_BATCH_BUFFER_START)) +
trackedAddressCount * (sizeof(typename GfxFamily::MI_LOAD_REGISTER_IMM) + aluCmdSize + 2 * sizeof(typename GfxFamily::MI_STORE_REGISTER_MEM) +
3 * sizeof(typename GfxFamily::MI_STORE_DATA_IMM) +
EncodeMiArbCheck<GfxFamily>::getCommandSizeWithWa(waArgs) +
EncodeMiArbCheck<GfxFamily>::getCommandSize() +
sizeof(typename GfxFamily::MI_BATCH_BUFFER_START));
}
return trackedAddressCount * NEO::EncodeStoreMemory<GfxFamily>::getStoreDataImmSize();
@@ -59,9 +58,8 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
const auto cmdStreamCpuBase = reinterpret_cast<uint64_t>(cmdStream.getCpuBase());
auto bbLevel = useFirstLevelBB ? MI_BATCH_BUFFER_START::SECOND_LEVEL_BATCH_BUFFER_FIRST_LEVEL_BATCH : MI_BATCH_BUFFER_START::SECOND_LEVEL_BATCH_BUFFER_SECOND_LEVEL_BATCH;
EncodeDummyBlitWaArgs waArgs{false};
if (fieldOffsetAndValue.size()) {
EncodeMiArbCheck<GfxFamily>::programWithWa(cmdStream, true, waArgs);
EncodeMiArbCheck<GfxFamily>::program(cmdStream, true);
// Jump to SDI command that is modified
auto newBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
@@ -89,7 +87,7 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
auto miStoreDataSettingSbaBufferAddress = cmdStream.getSpaceForCmd<MI_STORE_DATA_IMM>();
auto miStoreDataSettingSbaBufferAddress2 = cmdStream.getSpaceForCmd<MI_STORE_DATA_IMM>();
EncodeMiArbCheck<GfxFamily>::programWithWa(cmdStream, true, waArgs);
EncodeMiArbCheck<GfxFamily>::program(cmdStream, true);
// Jump to SDI command that is modified
auto newBuffer = cmdStream.getSpaceForCmd<MI_BATCH_BUFFER_START>();
@@ -150,7 +148,7 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
bbCmd.setSecondLevelBatchBuffer(bbLevel);
*previousBuffer = bbCmd;
EncodeMiArbCheck<GfxFamily>::programWithWa(cmdStream, false, waArgs);
EncodeMiArbCheck<GfxFamily>::program(cmdStream, false);
}
}

View File

@@ -238,8 +238,7 @@ void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchStaticRelaxedOrderingSch
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;
EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&this->rootDeviceEnvironment)};
EncodeMiArbCheck<GfxFamily>::programWithWa(schedulerCmdStream, std::nullopt, waArgs);
EncodeMiArbCheck<GfxFamily>::program(schedulerCmdStream, std::nullopt);
if (debugManager.flags.DirectSubmissionRelaxedOrderingQueueSizeLimit.get() != -1) {
currentRelaxedOrderingQueueSize = static_cast<uint32_t>(debugManager.flags.DirectSubmissionRelaxedOrderingQueueSizeLimit.get());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -21,8 +21,7 @@ inline size_t DirectSubmissionHw<GfxFamily, Dispatcher>::getSizePrefetchMitigati
template <typename GfxFamily, typename Dispatcher>
inline size_t DirectSubmissionHw<GfxFamily, Dispatcher>::getSizeDisablePrefetcher() {
EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&this->rootDeviceEnvironment)};
return EncodeMiArbCheck<GfxFamily>::getCommandSizeWithWa(waArgs);
return EncodeMiArbCheck<GfxFamily>::getCommandSize();
}
} // namespace NEO

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -13,8 +13,7 @@ template <typename GfxFamily, typename Dispatcher>
inline void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchDisablePrefetcher(bool disable) {
if (isDisablePrefetcherRequired) {
EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&this->rootDeviceEnvironment)};
EncodeMiArbCheck<GfxFamily>::programWithWa(ringCommandStream, disable, waArgs);
EncodeMiArbCheck<GfxFamily>::program(ringCommandStream, disable);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -13,8 +13,7 @@ template <typename GfxFamily, typename Dispatcher>
inline void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchDisablePrefetcher(bool disable) {
if (isDisablePrefetcherRequired) {
EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&this->rootDeviceEnvironment)};
EncodeMiArbCheck<GfxFamily>::programWithWa(ringCommandStream, disable, waArgs);
EncodeMiArbCheck<GfxFamily>::program(ringCommandStream, disable);
}
}

View File

@@ -66,7 +66,7 @@ void BlitCommandsHelper<GfxFamily>::dispatchPostBlitCommand(LinearStream &linear
if (debugManager.flags.PostBlitCommand.get() != BlitterConstants::PostBlitMode::defaultMode) {
switch (debugManager.flags.PostBlitCommand.get()) {
case BlitterConstants::PostBlitMode::miArbCheck:
EncodeMiArbCheck<GfxFamily>::programWithWa(linearStream, std::nullopt, waArgs);
EncodeMiArbCheck<GfxFamily>::program(linearStream, std::nullopt);
return;
case BlitterConstants::PostBlitMode::miFlush:
EncodeMiFlushDW<GfxFamily>::programWithWa(linearStream, 0, 0, args);
@@ -81,7 +81,7 @@ void BlitCommandsHelper<GfxFamily>::dispatchPostBlitCommand(LinearStream &linear
args.waArgs.isWaRequired = false;
}
EncodeMiArbCheck<GfxFamily>::programWithWa(linearStream, std::nullopt, waArgs);
EncodeMiArbCheck<GfxFamily>::program(linearStream, std::nullopt);
}
template <typename GfxFamily>
@@ -91,7 +91,7 @@ size_t BlitCommandsHelper<GfxFamily>::estimatePostBlitCommandSize(const RootDevi
if (debugManager.flags.PostBlitCommand.get() != BlitterConstants::PostBlitMode::defaultMode) {
switch (debugManager.flags.PostBlitCommand.get()) {
case BlitterConstants::PostBlitMode::miArbCheck:
return EncodeMiArbCheck<GfxFamily>::getCommandSizeWithWa(waArgs);
return EncodeMiArbCheck<GfxFamily>::getCommandSize();
case BlitterConstants::PostBlitMode::miFlush:
return EncodeMiFlushDW<GfxFamily>::getCommandSizeWithWa(waArgs);
default:
@@ -101,9 +101,8 @@ size_t BlitCommandsHelper<GfxFamily>::estimatePostBlitCommandSize(const RootDevi
size_t size = 0u;
if (BlitCommandsHelper<GfxFamily>::miArbCheckWaRequired()) {
size += EncodeMiFlushDW<GfxFamily>::getCommandSizeWithWa(waArgs);
waArgs.isWaRequired = false;
}
size += EncodeMiArbCheck<GfxFamily>::getCommandSizeWithWa(waArgs);
size += EncodeMiArbCheck<GfxFamily>::getCommandSize();
return size;
}

View File

@@ -384,8 +384,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncoderTests, givenDebugFlagSetWhenProgrammi
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[0];
rootDeviceEnvironment.initGmm();
EncodeDummyBlitWaArgs waArgs{};
EncodeMiArbCheck<FamilyType>::programWithWa(linearStream, false, waArgs);
EncodeMiArbCheck<FamilyType>::program(linearStream, false);
if (value == 0) {
EXPECT_TRUE(buffer[0].getPreParserDisable());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -148,19 +148,19 @@ HWTEST2_P(L0DebuggerBBlevelParameterizedTest, GivenNonZeroSbaAddressesWhenProgra
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, cmdStream.getCpuBase(), cmdStream.getUsed()));
size_t sizeExpected = EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(EncodeDummyBlitWaArgs{}) + sizeof(MI_BATCH_BUFFER_START);
size_t sizeExpected = EncodeMiArbCheck<FamilyType>::getCommandSize() + sizeof(MI_BATCH_BUFFER_START);
for (int i = 0; i < 6; i++) {
sizeExpected += NEO::EncodeSetMMIO<FamilyType>::sizeIMM;
sizeExpected += NEO::EncodeMath<FamilyType>::streamCommandSize;
sizeExpected += 2 * sizeof(MI_STORE_REGISTER_MEM);
sizeExpected += 2 * sizeof(MI_STORE_DATA_IMM);
sizeExpected += EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(EncodeDummyBlitWaArgs{});
sizeExpected += EncodeMiArbCheck<FamilyType>::getCommandSize();
sizeExpected += sizeof(MI_BATCH_BUFFER_START);
sizeExpected += sizeof(MI_STORE_DATA_IMM);
}
sizeExpected += EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(EncodeDummyBlitWaArgs{}) + sizeof(MI_BATCH_BUFFER_START);
sizeExpected += EncodeMiArbCheck<FamilyType>::getCommandSize() + sizeof(MI_BATCH_BUFFER_START);
EXPECT_EQ(sizeExpected, cmdStream.getUsed());
@@ -260,17 +260,17 @@ HWTEST2_P(L0DebuggerBBlevelParameterizedTest, GivenOneNonZeroSbaAddressesWhenPro
GenCmdList cmdList;
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(cmdList, cmdStream.getCpuBase(), cmdStream.getUsed()));
size_t sizeExpected = EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(EncodeDummyBlitWaArgs{}) + sizeof(MI_BATCH_BUFFER_START);
size_t sizeExpected = EncodeMiArbCheck<FamilyType>::getCommandSize() + sizeof(MI_BATCH_BUFFER_START);
sizeExpected += NEO::EncodeSetMMIO<FamilyType>::sizeIMM;
sizeExpected += NEO::EncodeMath<FamilyType>::streamCommandSize;
sizeExpected += 2 * sizeof(MI_STORE_REGISTER_MEM);
sizeExpected += 2 * sizeof(MI_STORE_DATA_IMM);
sizeExpected += EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(EncodeDummyBlitWaArgs{});
sizeExpected += EncodeMiArbCheck<FamilyType>::getCommandSize();
sizeExpected += sizeof(MI_BATCH_BUFFER_START);
sizeExpected += sizeof(MI_STORE_DATA_IMM);
sizeExpected += EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(EncodeDummyBlitWaArgs{}) + sizeof(MI_BATCH_BUFFER_START);
sizeExpected += EncodeMiArbCheck<FamilyType>::getCommandSize() + sizeof(MI_BATCH_BUFFER_START);
EXPECT_EQ(sizeExpected, cmdStream.getUsed());
EXPECT_EQ(sizeExpected, debugger->getSbaTrackingCommandsSize(1));

View File

@@ -1568,7 +1568,7 @@ HWTEST2_F(DirectSubmissionRelaxedOrderingTests, givenNewNumberOfClientsWhenDispa
const uint64_t expectedQueueSizeValueVa = directSubmission.relaxedOrderingSchedulerAllocation->getGpuAddress() +
RelaxedOrderingHelper::StaticSchedulerSizeAndOffsetSection<FamilyType>::drainRequestSectionStart +
EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(EncodeDummyBlitWaArgs{}) +
EncodeMiArbCheck<FamilyType>::getCommandSize() +
RelaxedOrderingHelper::getQueueSizeLimitValueOffset<FamilyType>();
auto findStaticSchedulerUpdate = [&](LinearStream &cs, size_t offset, uint32_t expectedQueueSize) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -22,7 +22,7 @@ XE_HPC_CORETEST_F(DirectSubmissionTestXeHpcCore, givenXeHpcCoreWhenDispatchDisab
MockDirectSubmissionHw<FamilyType, Dispatcher> directSubmission(*pDevice->getDefaultEngine().commandStreamReceiver);
EXPECT_EQ(EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(EncodeDummyBlitWaArgs{}), directSubmission.getSizeDisablePrefetcher());
EXPECT_EQ(EncodeMiArbCheck<FamilyType>::getCommandSize(), directSubmission.getSizeDisablePrefetcher());
bool ret = directSubmission.allocateResources();
EXPECT_TRUE(ret);

View File

@@ -155,11 +155,9 @@ HWTEST_F(BlitTests, givenDebugVariablesWhenGettingMaxBlitSizeThenHonorUseProvide
HWTEST_F(BlitTests, givenDebugVariableWhenEstimatingPostBlitsCommandSizeThenReturnCorrectResult) {
EncodeDummyBlitWaArgs waArgs{true, &(pDevice->getRootDeviceEnvironmentRef())};
size_t dummyBlitWaSize = BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
waArgs.isWaRequired = false;
DebugManagerStateRestore restore{};
size_t arbCheckSize = EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + dummyBlitWaSize;
size_t arbCheckSize = EncodeMiArbCheck<FamilyType>::getCommandSize();
size_t expectedDefaultSize = arbCheckSize;
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
@@ -187,7 +185,7 @@ HWTEST_F(BlitTests, givenDebugVariableWhenDispatchingPostBlitsCommandThenUseCorr
LinearStream linearStream{streamBuffer, sizeof(streamBuffer)};
GenCmdList commands{};
EncodeDummyBlitWaArgs waArgs{false, &(pDevice->getRootDeviceEnvironmentRef())};
size_t expectedDefaultSize = EncodeMiArbCheck<FamilyType>::getCommandSizeWithWa(waArgs) + BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
size_t expectedDefaultSize = EncodeMiArbCheck<FamilyType>::getCommandSize() + BlitCommandsHelper<FamilyType>::getDummyBlitSize(waArgs);
if (BlitCommandsHelper<FamilyType>::miArbCheckWaRequired()) {
expectedDefaultSize += EncodeMiFlushDW<FamilyType>::getCommandSizeWithWa(waArgs);