Add Clear SLM workaround for BDW

- set ProtectedMemoryDisable in PC prior to setting new L3 config

Change-Id: I2ecbfe9535ef45159b48fffa41faad66db55d074
This commit is contained in:
Hoppe, Mateusz
2018-05-21 10:57:28 +02:00
committed by sys_ocldev
parent 4cb86b4045
commit a1a224c3bc
5 changed files with 41 additions and 0 deletions

View File

@@ -92,6 +92,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
void addPipeControlWA(LinearStream &commandStream, bool flushDC);
void addDcFlushToPipeControl(typename GfxFamily::PIPE_CONTROL *pCmd, bool flushDC);
void addClearSLMWorkAround(typename GfxFamily::PIPE_CONTROL *pCmd);
PIPE_CONTROL *addPipeControlCmd(LinearStream &commandStream);
uint64_t getScratchPatchAddress();

View File

@@ -653,6 +653,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::programL3(LinearStream &csr, Dis
*pCmd = GfxFamily::cmdInitPipeControl;
pCmd->setCommandStreamerStallEnable(true);
pCmd->setDcFlushEnable(true);
addClearSLMWorkAround(pCmd);
PreambleHelper<GfxFamily>::programL3(&csr, newL3Config);
this->lastSentL3Config = newL3Config;
@@ -727,4 +728,8 @@ void CommandStreamReceiverHw<GfxFamily>::resetKmdNotifyHelper(KmdNotifyHelper *n
}
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::addClearSLMWorkAround(typename GfxFamily::PIPE_CONTROL *pCmd) {
}
} // namespace OCLRT

View File

@@ -58,6 +58,11 @@ void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver<Family>::create;
}
template <>
void CommandStreamReceiverHw<Family>::addClearSLMWorkAround(Family::PIPE_CONTROL *pCmd) {
pCmd->setProtectedMemoryDisable(1);
}
// Explicitly instantiate CommandStreamReceiverHw for this device family
template class CommandStreamReceiverHw<Family>;