2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2020-02-06 16:06:00 +01:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-23 18:46:50 +01:00
|
|
|
#include "helpers/preamble_bdw_plus.inl"
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
template <>
|
2020-02-06 16:06:00 +01:00
|
|
|
void PreambleHelper<BDWFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo, aub_stream::EngineType engineType) {
|
2018-02-23 14:01:12 +01:00
|
|
|
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
|
2019-01-17 17:10:12 +01:00
|
|
|
*pipeControl = BDWFamily::cmdInitPipeControl;
|
2018-02-23 14:01:12 +01:00
|
|
|
pipeControl->setCommandStreamerStallEnable(true);
|
|
|
|
|
pipeControl->setDcFlushEnable(true);
|
2017-12-21 00:45:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <>
|
|
|
|
|
uint32_t PreambleHelper<BDWFamily>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
|
|
|
|
|
uint32_t l3Config = 0;
|
|
|
|
|
|
2019-05-08 16:00:24 +02:00
|
|
|
switch (hwInfo.platform.eProductFamily) {
|
2017-12-21 00:45:38 +01:00
|
|
|
case IGFX_BROADWELL:
|
|
|
|
|
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(useSLM);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(true);
|
|
|
|
|
}
|
|
|
|
|
return l3Config;
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-05 14:57:15 -07:00
|
|
|
template <>
|
|
|
|
|
bool PreambleHelper<BDWFamily>::isL3Configurable(const HardwareInfo &hwInfo) {
|
|
|
|
|
return getL3Config(hwInfo, true) != getL3Config(hwInfo, false);
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
template <>
|
2019-08-19 15:01:00 +02:00
|
|
|
void PreambleHelper<BDWFamily>::programPipelineSelect(LinearStream *pCommandStream,
|
2019-09-10 16:13:11 +02:00
|
|
|
const PipelineSelectArgs &pipelineSelectArgs,
|
2019-08-19 15:01:00 +02:00
|
|
|
const HardwareInfo &hwInfo) {
|
|
|
|
|
|
2018-01-17 08:37:47 +01:00
|
|
|
typedef typename BDWFamily::PIPELINE_SELECT PIPELINE_SELECT;
|
|
|
|
|
auto pCmd = (PIPELINE_SELECT *)pCommandStream->getSpace(sizeof(PIPELINE_SELECT));
|
2019-01-17 17:10:12 +01:00
|
|
|
*pCmd = BDWFamily::cmdInitPipelineSelect;
|
2018-01-17 08:37:47 +01:00
|
|
|
pCmd->setMaskBits(pipelineSelectEnablePipelineSelectMaskBits);
|
|
|
|
|
pCmd->setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU);
|
2018-01-16 11:30:53 +01:00
|
|
|
}
|
|
|
|
|
|
2018-11-05 11:52:19 +01:00
|
|
|
template <>
|
|
|
|
|
size_t PreambleHelper<BDWFamily>::getAdditionalCommandsSize(const Device &device) {
|
2020-02-10 15:57:49 +01:00
|
|
|
return getKernelDebuggingCommandsSize(device.isDebuggerActive());
|
2018-11-05 11:52:19 +01:00
|
|
|
}
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
template struct PreambleHelper<BDWFamily>;
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|