Add function to detect conditions to reset CSR
Change-Id: I76d21eee26e22e841670180392c1b9262f6b59e1
This commit is contained in:
parent
c878590162
commit
72da161769
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018 Intel Corporation
|
* Copyright (C) 2018-2019 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -95,6 +95,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||||
|
|
||||||
static void emitNoop(LinearStream &commandStream, size_t bytesToUpdate);
|
static void emitNoop(LinearStream &commandStream, size_t bytesToUpdate);
|
||||||
|
|
||||||
|
bool detectInitProgrammingFlagsRequired(const DispatchFlags &dispatchFlags) const;
|
||||||
|
|
||||||
HeapDirtyState dshState;
|
HeapDirtyState dshState;
|
||||||
HeapDirtyState iohState;
|
HeapDirtyState iohState;
|
||||||
HeapDirtyState sshState;
|
HeapDirtyState sshState;
|
||||||
|
|
|
@ -165,7 +165,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||||
if (DebugManager.flags.ForceCsrFlushing.get()) {
|
if (DebugManager.flags.ForceCsrFlushing.get()) {
|
||||||
flushBatchedSubmissions();
|
flushBatchedSubmissions();
|
||||||
}
|
}
|
||||||
if (DebugManager.flags.ForceCsrReprogramming.get()) {
|
if (detectInitProgrammingFlagsRequired(dispatchFlags)) {
|
||||||
initProgrammingFlags();
|
initProgrammingFlags();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,7 +407,6 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||||
GraphicsAllocation *chainedBatchBuffer = nullptr;
|
GraphicsAllocation *chainedBatchBuffer = nullptr;
|
||||||
|
|
||||||
if (submitTask) {
|
if (submitTask) {
|
||||||
programMediaSampler(commandStreamTask, dispatchFlags);
|
|
||||||
this->addBatchBufferEnd(commandStreamTask, &bbEndLocation);
|
this->addBatchBufferEnd(commandStreamTask, &bbEndLocation);
|
||||||
this->emitNoop(commandStreamTask, bbEndPaddingSize);
|
this->emitNoop(commandStreamTask, bbEndPaddingSize);
|
||||||
this->alignToCacheLine(commandStreamTask);
|
this->alignToCacheLine(commandStreamTask);
|
||||||
|
@ -812,4 +811,9 @@ template <typename GfxFamily>
|
||||||
uint64_t CommandStreamReceiverHw<GfxFamily>::getScratchPatchAddress() {
|
uint64_t CommandStreamReceiverHw<GfxFamily>::getScratchPatchAddress() {
|
||||||
return scratchSpaceController->getScratchPatchAddress();
|
return scratchSpaceController->getScratchPatchAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename GfxFamily>
|
||||||
|
bool CommandStreamReceiverHw<GfxFamily>::detectInitProgrammingFlagsRequired(const DispatchFlags &dispatchFlags) const {
|
||||||
|
return DebugManager.flags.ForceCsrReprogramming.get();
|
||||||
|
}
|
||||||
} // namespace OCLRT
|
} // namespace OCLRT
|
||||||
|
|
Loading…
Reference in New Issue