mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Add BB_START prepatching WA - disabled by default
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1b4319fdab
commit
79fedd59e4
@@ -94,13 +94,21 @@ inline void CommandStreamReceiverHw<GfxFamily>::addBatchBufferEnd(LinearStream &
|
||||
template <typename GfxFamily>
|
||||
inline void CommandStreamReceiverHw<GfxFamily>::programEndingCmd(LinearStream &commandStream, Device &device, void **patchLocation, bool directSubmissionEnabled) {
|
||||
if (directSubmissionEnabled) {
|
||||
uint64_t startAddress = 0;
|
||||
if (DebugManager.flags.BatchBufferStartPrepatchingWaEnabled.get() == 1) {
|
||||
startAddress = commandStream.getGraphicsAllocation()->getGpuAddress() + commandStream.getUsed();
|
||||
}
|
||||
|
||||
*patchLocation = commandStream.getSpace(sizeof(MI_BATCH_BUFFER_START));
|
||||
auto bbStart = reinterpret_cast<MI_BATCH_BUFFER_START *>(*patchLocation);
|
||||
MI_BATCH_BUFFER_START cmd = {};
|
||||
addBatchBufferStart(&cmd, 0ull, false);
|
||||
|
||||
addBatchBufferStart(&cmd, startAddress, false);
|
||||
*bbStart = cmd;
|
||||
} else {
|
||||
PreemptionHelper::programStateSipEndWa<GfxFamily>(commandStream, device);
|
||||
if (!EngineHelpers::isBcs(osContext->getEngineType())) {
|
||||
PreemptionHelper::programStateSipEndWa<GfxFamily>(commandStream, device);
|
||||
}
|
||||
this->addBatchBufferEnd(commandStream, patchLocation);
|
||||
}
|
||||
}
|
||||
@@ -1091,16 +1099,7 @@ uint32_t CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropertiesCo
|
||||
}
|
||||
|
||||
void *endingCmdPtr = nullptr;
|
||||
if (blitterDirectSubmission) {
|
||||
endingCmdPtr = commandStream.getSpace(0);
|
||||
EncodeBatchBufferStartOrEnd<GfxFamily>::programBatchBufferStart(&commandStream,
|
||||
0ull,
|
||||
false);
|
||||
} else {
|
||||
auto batchBufferEnd = reinterpret_cast<MI_BATCH_BUFFER_END *>(
|
||||
commandStream.getSpace(sizeof(MI_BATCH_BUFFER_END)));
|
||||
*batchBufferEnd = GfxFamily::cmdInitBatchBufferEnd;
|
||||
}
|
||||
programEndingCmd(commandStream, device, &endingCmdPtr, blitterDirectSubmission);
|
||||
|
||||
EncodeNoop<GfxFamily>::alignToCacheLine(commandStream);
|
||||
|
||||
|
||||
@@ -195,6 +195,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, OverridePatIndex, -1, "-1: default, >=0: PatInde
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, UseTileMemoryBankInVirtualMemoryCreation, -1, "-1: default - on, 0: do not assign tile memory bank to virtual memory space, 1: assign tile memory bank to virtual memory space")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideTimestampEvents, -1, "-1: default (based on user settings), 0: Force disable timestamp events (no timestamps will be reported), 1: Force enable timestamp events")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForcePreParserEnabledForMiArbCheck, -1, "-1: default , 0: PreParser disabled, 1: PreParser enabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, BatchBufferStartPrepatchingWaEnabled, -1, "-1: default , 0: disabled, 1: enabled. WA applies valid VA pointing to 'self' instead of 0x0. This mitigates incorrect VA preparsing.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DisableScratchPages, false, "Disable scratch pages during VM creations")
|
||||
/*LOGGING FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, PrintDriverDiagnostics, -1, "prints driver diagnostics messages to standard output, value corresponds to hint level")
|
||||
|
||||
Reference in New Issue
Block a user