Skip to content

Commit 9a7e57d

Browse files
Fixes for BDW device enqueue
- add DC Flush to PipeControl with CSStall - fix SLB SPACE_FOR_EACH_ENQUEUE size for gen8 Change-Id: Ida6ced371e86ff0f8c1b23f08e64fa73530e37b1
1 parent 1e045e3 commit 9a7e57d

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

runtime/device_queue/device_queue_hw.h

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class DeviceQueueHw : public DeviceQueue {
9191
void addPipeControlCmdWa(bool isNoopCmd = false);
9292
void initPipeControl(PIPE_CONTROL *pc);
9393
void buildSlbDummyCommands();
94+
void addDcFlushToPipeControlWa(PIPE_CONTROL *pc);
9495

9596
void addProfilingEndCmds(uint64_t timestampAddress);
9697
static size_t getProfilingEndCmdsSize();

runtime/device_queue/device_queue_hw.inl

+5
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,8 @@ void DeviceQueueHw<GfxFamily>::addMediaStateClearCmds() {
430430
pipeControl->setGenericMediaStateClear(true);
431431
pipeControl->setCommandStreamerStallEnable(true);
432432

433+
addDcFlushToPipeControlWa(pipeControl);
434+
433435
PreambleHelper<GfxFamily>::programVFEState(&slbCS, device->getHardwareInfo(), 0, 0);
434436
}
435437

@@ -471,4 +473,7 @@ size_t DeviceQueueHw<GfxFamily>::getProfilingEndCmdsSize() {
471473
return size;
472474
}
473475

476+
template <typename GfxFamily>
477+
void DeviceQueueHw<GfxFamily>::addDcFlushToPipeControlWa(PIPE_CONTROL *pc) {}
478+
474479
} // namespace OCLRT

runtime/gen8/device_enqueue.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
#ifdef WA_LRI_COMMANDS_EXIST_GEN8
4646

47-
#define SECOND_LEVEL_BUFFER_SPACE_FOR_EACH_ENQUEUE_GEN8PLUS (OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_SIZEOF_MI_ATOMIC_CMD + OCLRT_SIZEOF_MEDIA_VFE_STATE_CMD + OCLRT_SIZEOF_MEDIA_INTERFACE_DESCRIPTOR_LOAD_DEVICE_CMD + OCLRT_LOAD_REGISTER_IMM_CMD_G8 + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G8 + OCLRT_GPGPU_WALKER_CMD_DEVICE_CMD_G8 + OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G8 + OCLRT_LOAD_REGISTER_IMM_CMD_G8 + CS_PREFETCH_SIZE)
47+
#define SECOND_LEVEL_BUFFER_SPACE_FOR_EACH_ENQUEUE_GEN8PLUS (OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_SIZEOF_MI_ATOMIC_CMD + OCLRT_SIZEOF_MEDIA_INTERFACE_DESCRIPTOR_LOAD_DEVICE_CMD + OCLRT_LOAD_REGISTER_IMM_CMD_G8 + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G8 + OCLRT_GPGPU_WALKER_CMD_DEVICE_CMD_G8 + OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G8 + OCLRT_LOAD_REGISTER_IMM_CMD_G8 + CS_PREFETCH_SIZE)
4848

4949
#else
5050

runtime/gen8/device_queue_gen8.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,10 @@ void DeviceQueueHw<Family>::addProfilingEndCmds(uint64_t timestampAddress) {
8181
pPipeControlCmd->setAddress(timestampAddress & (0xffffffff));
8282
}
8383

84+
template <>
85+
void DeviceQueueHw<Family>::addDcFlushToPipeControlWa(PIPE_CONTROL *pc) {
86+
pc->setDcFlushEnable(true);
87+
}
88+
8489
template class DeviceQueueHw<Family>;
8590
} // namespace OCLRT

0 commit comments

Comments
 (0)