Enable midthread preemption after the setup is completed

previous:
enable midthread preemption
<...>
csr base
<...>
pipe control + debug control 2
pipe control + VFE state

after:
<...>
csr base
<...>
pipe control + debug control 2
pipe control + VFE state
enable midthread preemption

This is to avoid a race condition and prevent midthread
preemption until the setup is completed.

Change-Id: Icfc1fc839f89e7c51d8e760e544839639fd7d983
Signed-off-by: James Xiong <james.xiong@intel.com>
This commit is contained in:
James Xiong
2019-10-07 10:54:39 -07:00
committed by sys_ocldev
parent 50f40296c4
commit e6d9b38e1f

View File

@ -259,7 +259,6 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
}
initPageTableManagerRegisters(commandStreamCSR);
programPreemption(commandStreamCSR, dispatchFlags);
programComputeMode(commandStreamCSR, dispatchFlags);
programL3(commandStreamCSR, dispatchFlags, newL3Config);
programPipelineSelect(commandStreamCSR, dispatchFlags.pipelineSelectArgs);
@ -275,6 +274,8 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
programVFEState(commandStreamCSR, dispatchFlags, device.getDeviceInfo().maxFrontEndThreads);
programPreemption(commandStreamCSR, dispatchFlags);
bool dshDirty = dshState.updateAndCheck(&dsh);
bool iohDirty = iohState.updateAndCheck(&ioh);
bool sshDirty = sshState.updateAndCheck(&ssh);