Reuse common logic of programming SCM fields for gen 9 and gen 11

Logic related to programming non coherent and thread arbitration policy for
gens 9 and 11 has been moved to EncodeComputeMode object, where similar
logic for gens gen12lp and newer is located.

Functions PreambleHelper::programThreadArbitration and
PreambleHelper::getThreadArbitrationCommandsSize have been removed.

Redundant setForceNonCoherent call has been removed from XE HPG

Related-To: NEO-6728

Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2022-03-08 14:18:31 +00:00
committed by Compute-Runtime-Automation
parent 5d90e2ab1d
commit cd95572443
31 changed files with 190 additions and 273 deletions

View File

@@ -63,26 +63,6 @@ void PreambleHelper<ICLFamily>::addPipeControlBeforeVfeCmd(LinearStream *pComman
*pipeControl = cmd;
}
template <>
void PreambleHelper<ICLFamily>::programThreadArbitration(LinearStream *pCommandStream, int32_t requiredThreadArbitrationPolicy) {
UNRECOVERABLE_IF(requiredThreadArbitrationPolicy == ThreadArbitrationPolicy::NotPresent);
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
PIPE_CONTROL cmd = ICLFamily::cmdInitPipeControl;
cmd.setCommandStreamerStallEnable(true);
*pipeControl = cmd;
LriHelper<ICLFamily>::program(pCommandStream,
RowChickenReg4::address,
RowChickenReg4::regDataForArbitrationPolicy[requiredThreadArbitrationPolicy],
false);
}
template <>
size_t PreambleHelper<ICLFamily>::getThreadArbitrationCommandsSize() {
return sizeof(MI_LOAD_REGISTER_IMM) + sizeof(PIPE_CONTROL);
}
template <>
std::vector<int32_t> PreambleHelper<ICLFamily>::getSupportedThreadArbitrationPolicies() {
std::vector<int32_t> retVal;