Unify programming of pipe control command

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2022-05-13 00:29:53 +00:00
committed by Compute-Runtime-Automation
parent 7eafb1e877
commit 52a3bfcfde
15 changed files with 104 additions and 103 deletions

View File

@@ -22,8 +22,8 @@ void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
}
template <>
void CommandStreamReceiverHw<Family>::addClearSLMWorkAround(Family::PIPE_CONTROL *pCmd) {
pCmd->setProtectedMemoryDisable(1);
void CommandStreamReceiverHw<Family>::setClearSlmWorkAroundParameter(PipeControlArgs &args) {
args.protectedMemoryDisable = true;
}
template class CommandStreamReceiverHw<Family>;

View File

@@ -9,17 +9,17 @@
namespace NEO {
using Family = BDWFamily;
template <>
void PreambleHelper<BDWFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType) {
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
PIPE_CONTROL cmd = BDWFamily::cmdInitPipeControl;
cmd.setCommandStreamerStallEnable(true);
cmd.setDcFlushEnable(true);
*pipeControl = cmd;
void PreambleHelper<Family>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, EngineGroupType engineGroupType) {
PipeControlArgs args = {};
args.dcFlushEnable = true;
MemorySynchronizationCommands<Family>::addPipeControl(*pCommandStream, args);
}
template <>
uint32_t PreambleHelper<BDWFamily>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
uint32_t PreambleHelper<Family>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
uint32_t l3Config = 0;
switch (hwInfo.platform.eProductFamily) {
@@ -33,18 +33,18 @@ uint32_t PreambleHelper<BDWFamily>::getL3Config(const HardwareInfo &hwInfo, bool
}
template <>
bool PreambleHelper<BDWFamily>::isL3Configurable(const HardwareInfo &hwInfo) {
bool PreambleHelper<Family>::isL3Configurable(const HardwareInfo &hwInfo) {
return getL3Config(hwInfo, true) != getL3Config(hwInfo, false);
}
template <>
void PreambleHelper<BDWFamily>::programPipelineSelect(LinearStream *pCommandStream,
const PipelineSelectArgs &pipelineSelectArgs,
const HardwareInfo &hwInfo) {
void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream,
const PipelineSelectArgs &pipelineSelectArgs,
const HardwareInfo &hwInfo) {
using PIPELINE_SELECT = typename BDWFamily::PIPELINE_SELECT;
using PIPELINE_SELECT = typename Family::PIPELINE_SELECT;
auto pCmd = pCommandStream->getSpaceForCmd<PIPELINE_SELECT>();
PIPELINE_SELECT cmd = BDWFamily::cmdInitPipelineSelect;
PIPELINE_SELECT cmd = Family::cmdInitPipelineSelect;
cmd.setMaskBits(pipelineSelectEnablePipelineSelectMaskBits);
cmd.setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU);
@@ -53,10 +53,10 @@ void PreambleHelper<BDWFamily>::programPipelineSelect(LinearStream *pCommandStre
}
template <>
size_t PreambleHelper<BDWFamily>::getAdditionalCommandsSize(const Device &device) {
size_t PreambleHelper<Family>::getAdditionalCommandsSize(const Device &device) {
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
return getKernelDebuggingCommandsSize(debuggingEnabled);
}
template struct PreambleHelper<BDWFamily>;
template struct PreambleHelper<Family>;
} // namespace NEO