2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2019-02-27 18:39:32 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2018-01-08 22:58:02 +08:00
|
|
|
#include "runtime/built_ins/built_ins.h"
|
2018-03-02 05:43:04 +08:00
|
|
|
#include "runtime/command_stream/csr_definitions.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
#include "runtime/command_stream/preemption.h"
|
2018-01-02 19:10:34 +08:00
|
|
|
#include "runtime/command_stream/preemption.inl"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-02-27 18:39:32 +08:00
|
|
|
#include <cstring>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
typedef SKLFamily GfxFamily;
|
|
|
|
|
|
|
|
template <>
|
2018-02-12 20:41:08 +08:00
|
|
|
struct PreemptionConfig<GfxFamily> {
|
|
|
|
static constexpr uint32_t mmioAddress = 0x2580;
|
|
|
|
static constexpr uint32_t maskVal = (1 << 1) | (1 << 2);
|
|
|
|
static constexpr uint32_t maskShift = 16;
|
|
|
|
static constexpr uint32_t mask = maskVal << maskShift;
|
|
|
|
|
|
|
|
static constexpr uint32_t threadGroupVal = (1 << 1);
|
|
|
|
static constexpr uint32_t cmdLevelVal = (1 << 2);
|
|
|
|
static constexpr uint32_t midThreadVal = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStream,
|
|
|
|
PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode,
|
|
|
|
GraphicsAllocation *preemptionCsr,
|
2018-03-27 15:58:00 +08:00
|
|
|
Device &device);
|
2018-11-05 18:52:19 +08:00
|
|
|
|
2018-02-12 20:41:08 +08:00
|
|
|
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
|
2018-11-05 18:52:19 +08:00
|
|
|
template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
|
|
|
|
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device);
|
|
|
|
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(const Device &device);
|
2018-02-12 20:41:08 +08:00
|
|
|
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
2018-01-02 19:10:34 +08:00
|
|
|
template size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device);
|
|
|
|
template void PreemptionHelper::applyPreemptionWaCmdsBegin<GfxFamily>(LinearStream *pCommandStream, const Device &device);
|
|
|
|
template void PreemptionHelper::applyPreemptionWaCmdsEnd<GfxFamily>(LinearStream *pCommandStream, const Device &device);
|
2018-03-02 05:43:04 +08:00
|
|
|
template void PreemptionHelper::programInterfaceDescriptorDataPreemption<GfxFamily>(INTERFACE_DESCRIPTOR_DATA<GfxFamily> *idd, PreemptionMode preemptionMode);
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|