From e6d9b38e1f221fd8d4322ac8213c07c6a8c0c08d Mon Sep 17 00:00:00 2001 From: James Xiong Date: Mon, 7 Oct 2019 10:54:39 -0700 Subject: [PATCH] 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 --- runtime/command_stream/command_stream_receiver_hw_base.inl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/command_stream/command_stream_receiver_hw_base.inl b/runtime/command_stream/command_stream_receiver_hw_base.inl index bc48ba9b2f5d4..bb396f69c55fa 100644 --- a/runtime/command_stream/command_stream_receiver_hw_base.inl +++ b/runtime/command_stream/command_stream_receiver_hw_base.inl @@ -259,7 +259,6 @@ CompletionStamp CommandStreamReceiverHw::flushTask( } initPageTableManagerRegisters(commandStreamCSR); - programPreemption(commandStreamCSR, dispatchFlags); programComputeMode(commandStreamCSR, dispatchFlags); programL3(commandStreamCSR, dispatchFlags, newL3Config); programPipelineSelect(commandStreamCSR, dispatchFlags.pipelineSelectArgs); @@ -275,6 +274,8 @@ CompletionStamp CommandStreamReceiverHw::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);