mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add notify enable parameter to post sync commands
Related-To: NEO-5845 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a1036ecc75
commit
0e5ca243e2
@@ -107,6 +107,7 @@ set(NEO_CORE_HELPERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vec.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions/${BRANCH_DIR_SUFFIX}/hw_cmds.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions/${BRANCH_DIR_SUFFIX}/engine_group_types.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions/mi_flush_args.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions/pipe_control_args_base.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/pipe_control_args.h
|
||||
)
|
||||
|
||||
@@ -43,7 +43,8 @@ uint64_t BlitCommandsHelper<GfxFamily>::getMaxBlitHeight(const RootDeviceEnviron
|
||||
template <typename GfxFamily>
|
||||
void BlitCommandsHelper<GfxFamily>::dispatchPreBlitCommand(LinearStream &linearStream) {
|
||||
if (BlitCommandsHelper<GfxFamily>::preBlitCommandWARequired()) {
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, false, false);
|
||||
MiFlushArgs args;
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,13 +59,14 @@ size_t BlitCommandsHelper<GfxFamily>::estimatePreBlitCommandSize() {
|
||||
|
||||
template <typename GfxFamily>
|
||||
void BlitCommandsHelper<GfxFamily>::dispatchPostBlitCommand(LinearStream &linearStream) {
|
||||
MiFlushArgs args;
|
||||
if (DebugManager.flags.PostBlitCommand.get() != BlitterConstants::PostBlitMode::Default) {
|
||||
switch (DebugManager.flags.PostBlitCommand.get()) {
|
||||
case BlitterConstants::PostBlitMode::MiArbCheck:
|
||||
EncodeMiArbCheck<GfxFamily>::program(linearStream);
|
||||
return;
|
||||
case BlitterConstants::PostBlitMode::MiFlush:
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, false, false);
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, args);
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
@@ -72,7 +74,7 @@ void BlitCommandsHelper<GfxFamily>::dispatchPostBlitCommand(LinearStream &linear
|
||||
}
|
||||
|
||||
if (BlitCommandsHelper<GfxFamily>::miArbCheckWaRequired()) {
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, false, false);
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(linearStream, 0, 0, args);
|
||||
}
|
||||
|
||||
EncodeMiArbCheck<GfxFamily>::program(linearStream);
|
||||
@@ -298,7 +300,9 @@ template <typename GfxFamily>
|
||||
void BlitCommandsHelper<GfxFamily>::dispatchDebugPauseCommands(LinearStream &commandStream, uint64_t debugPauseStateGPUAddress, DebugPauseState confirmationTrigger, DebugPauseState waitCondition) {
|
||||
using MI_SEMAPHORE_WAIT = typename GfxFamily::MI_SEMAPHORE_WAIT;
|
||||
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(commandStream, debugPauseStateGPUAddress, static_cast<uint32_t>(confirmationTrigger), false, true);
|
||||
MiFlushArgs args;
|
||||
args.commandWithPostSync = true;
|
||||
EncodeMiFlushDW<GfxFamily>::programMiFlushDw(commandStream, debugPauseStateGPUAddress, static_cast<uint32_t>(confirmationTrigger), args);
|
||||
|
||||
EncodeSempahore<GfxFamily>::addMiSemaphoreWaitCommand(commandStream, debugPauseStateGPUAddress, static_cast<uint32_t>(waitCondition), MI_SEMAPHORE_WAIT::COMPARE_OPERATION::COMPARE_OPERATION_SAD_EQUAL_SDD);
|
||||
}
|
||||
|
||||
18
shared/source/helpers/definitions/mi_flush_args.h
Normal file
18
shared/source/helpers/definitions/mi_flush_args.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace NEO {
|
||||
struct MiFlushArgs {
|
||||
bool timeStampOperation = false;
|
||||
bool commandWithPostSync = false;
|
||||
bool notifyEnable = false;
|
||||
|
||||
MiFlushArgs() = default;
|
||||
};
|
||||
} // namespace NEO
|
||||
@@ -19,6 +19,7 @@ struct PipeControlArgsBase {
|
||||
bool genericMediaStateClear = false;
|
||||
bool hdcPipelineFlush = false;
|
||||
bool tlbInvalidation = false;
|
||||
bool notifyEnable = false;
|
||||
|
||||
protected:
|
||||
PipeControlArgsBase() = default;
|
||||
|
||||
@@ -250,6 +250,7 @@ void MemorySynchronizationCommands<GfxFamily>::setPipeControl(typename GfxFamily
|
||||
pipeControl.setVfCacheInvalidationEnable(args.vfCacheInvalidationEnable);
|
||||
pipeControl.setGenericMediaStateClear(args.genericMediaStateClear);
|
||||
pipeControl.setTlbInvalidate(args.tlbInvalidation);
|
||||
pipeControl.setNotifyEnable(args.notifyEnable);
|
||||
|
||||
if (isDcFlushAllowed()) {
|
||||
pipeControl.setDcFlushEnable(args.dcFlushEnable);
|
||||
|
||||
Reference in New Issue
Block a user