mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
[23/n] Internal 4GB allocator.
- Align SIP kernel & STATE_SIP programming. - on Linux address may be non 0 - on Windows address is expected to be always 0 Change-Id: I385ed59ef652382f3f17d1afe55f6050d07ed1f4
This commit is contained in:
committed by
sys_ocldev
parent
2b6fc61e7b
commit
296c527a0b
@@ -45,7 +45,7 @@ class PreemptionHelper {
|
||||
static size_t getRequiredPreambleSize(const Device &device);
|
||||
|
||||
template <typename GfxFamily>
|
||||
static void programPreamble(LinearStream &preambleCmdStream, const Device &device, const GraphicsAllocation *preemptionCsr);
|
||||
static void programPreamble(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
|
||||
|
||||
template <typename GfxFamily>
|
||||
static size_t getRequiredCmdStreamSize(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "runtime/built_ins/built_ins.h"
|
||||
#include "runtime/built_ins/sip.h"
|
||||
#include "runtime/command_stream/preemption.h"
|
||||
#include "runtime/device/device.h"
|
||||
#include "runtime/command_queue/dispatch_walker_helper.h"
|
||||
@@ -72,7 +74,7 @@ void PreemptionHelper::applyPreemptionWaCmdsEnd(LinearStream *pCommandStream, co
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void PreemptionHelper::programPreamble(LinearStream &preambleCmdStream, const Device &device,
|
||||
void PreemptionHelper::programPreamble(LinearStream &preambleCmdStream, Device &device,
|
||||
const GraphicsAllocation *preemptionCsr) {
|
||||
if (device.getPreemptionMode() != PreemptionMode::MidThread) {
|
||||
return;
|
||||
@@ -88,7 +90,7 @@ void PreemptionHelper::programPreamble(LinearStream &preambleCmdStream, const De
|
||||
|
||||
auto sip = reinterpret_cast<STATE_SIP *>(preambleCmdStream.getSpace(sizeof(STATE_SIP)));
|
||||
sip->init();
|
||||
sip->setSystemInstructionPointer(0);
|
||||
sip->setSystemInstructionPointer(BuiltIns::getInstance().getSipKernel(SipKernelType::Csr, device).getSipAllocation()->getGpuAddressToPatch());
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -62,7 +62,7 @@ size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device
|
||||
}
|
||||
|
||||
template <>
|
||||
void PreemptionHelper::programPreamble<GfxFamily>(LinearStream &preambleCmdStream, const Device &device,
|
||||
void PreemptionHelper::programPreamble<GfxFamily>(LinearStream &preambleCmdStream, Device &device,
|
||||
const GraphicsAllocation *preemptionCsr) {
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStr
|
||||
PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode,
|
||||
GraphicsAllocation *preemptionCsr,
|
||||
Device &device);
|
||||
template void PreemptionHelper::programPreamble<GfxFamily>(LinearStream &preambleCmdStream, const Device &device, const GraphicsAllocation *preemptionCsr);
|
||||
template void PreemptionHelper::programPreamble<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
|
||||
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
|
||||
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
|
||||
template size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device);
|
||||
|
||||
@@ -45,10 +45,10 @@ struct PreambleHelper {
|
||||
static void programPipelineSelect(LinearStream *pCommandStream, bool mediaSamplerRequired);
|
||||
static uint32_t getDefaultThreadArbitrationPolicy();
|
||||
static void programThreadArbitration(LinearStream *pCommandStream, uint32_t requiredThreadArbitrationPolicy);
|
||||
static void programPreemption(LinearStream *pCommandStream, const Device &device, GraphicsAllocation *preemptionCsr);
|
||||
static void programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr);
|
||||
static void addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo);
|
||||
static void programVFEState(LinearStream *pCommandStream, const HardwareInfo &hwInfo, int scratchSize, uint64_t scratchAddress);
|
||||
static void programPreamble(LinearStream *pCommandStream, const Device &device, uint32_t l3Config,
|
||||
static void programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config,
|
||||
uint32_t requiredThreadArbitrationPolicy, GraphicsAllocation *preemptionCsr);
|
||||
static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM);
|
||||
static size_t getAdditionalCommandsSize(const Device &device);
|
||||
|
||||
@@ -79,7 +79,7 @@ void PreambleHelper<GfxFamily>::programL3(LinearStream *pCommandStream, uint32_t
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void PreambleHelper<GfxFamily>::programPreamble(LinearStream *pCommandStream, const Device &device, uint32_t l3Config,
|
||||
void PreambleHelper<GfxFamily>::programPreamble(LinearStream *pCommandStream, Device &device, uint32_t l3Config,
|
||||
uint32_t requiredThreadArbitrationPolicy, GraphicsAllocation *preemptionCsr) {
|
||||
programL3(pCommandStream, l3Config);
|
||||
programThreadArbitration(pCommandStream, requiredThreadArbitrationPolicy);
|
||||
@@ -88,7 +88,7 @@ void PreambleHelper<GfxFamily>::programPreamble(LinearStream *pCommandStream, co
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void PreambleHelper<GfxFamily>::programPreemption(LinearStream *pCommandStream, const Device &device, GraphicsAllocation *preemptionCsr) {
|
||||
void PreambleHelper<GfxFamily>::programPreemption(LinearStream *pCommandStream, Device &device, GraphicsAllocation *preemptionCsr) {
|
||||
PreemptionHelper::programPreamble<GfxFamily>(*pCommandStream, device, preemptionCsr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user