Skip to content

Commit

Permalink
Enable midthread preemption after the setup is completed
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jamesxio authored and Compute-Runtime-Automation committed Oct 8, 2019
1 parent 50f4029 commit e6d9b38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/command_stream/command_stream_receiver_hw_base.inl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
}

initPageTableManagerRegisters(commandStreamCSR);
programPreemption(commandStreamCSR, dispatchFlags);
programComputeMode(commandStreamCSR, dispatchFlags);
programL3(commandStreamCSR, dispatchFlags, newL3Config);
programPipelineSelect(commandStreamCSR, dispatchFlags.pipelineSelectArgs);
Expand All @@ -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);
Expand Down

0 comments on commit e6d9b38

Please sign in to comment.