Skip to content

Commit 5be4d89

Browse files
Rename function
Rename MemorySynchronizationCommands::isDcFlushAllowed to MemorySynchronizationCommands::getDcFlushEnable Signed-off-by: Filip Hazubski <[email protected]>
1 parent 187120f commit 5be4d89

File tree

49 files changed

+105
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+105
-105
lines changed

level_zero/core/source/cmdlist/cmdlist_hw.inl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendEventReset(ze_event_hand
326326
Event::STATE_CLEARED, args, hwInfo);
327327
} else {
328328
NEO::PipeControlArgs args;
329-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(event->signalScope, hwInfo);
329+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(event->signalScope, hwInfo);
330330
size_t estimateSize = NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForPipeControlWithPostSyncOperation(hwInfo) * packetsToReset;
331331
if (this->partitionCount > 1) {
332332
estimateSize += estimateBufferSizeMultiTileBarrier(hwInfo);
@@ -623,7 +623,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendImageCopyToMemory(void *
623623
if (allocationStruct.needsFlush) {
624624
const auto &hwInfo = this->device->getHwInfo();
625625
NEO::PipeControlArgs args;
626-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
626+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
627627
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(), args);
628628
}
629629

@@ -1037,7 +1037,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendPageFaultCopy(NEO::Graph
10371037
}
10381038

10391039
const auto &hwInfo = this->device->getHwInfo();
1040-
if (NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo)) {
1040+
if (NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo)) {
10411041
if (flushHost) {
10421042
NEO::PipeControlArgs args;
10431043
args.dcFlushEnable = true;
@@ -1159,7 +1159,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
11591159
appendEventForProfilingAllWalkers(hSignalEvent, false);
11601160

11611161
const auto &hwInfo = this->device->getHwInfo();
1162-
if (NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo)) {
1162+
if (NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo)) {
11631163
auto event = Event::fromHandle(hSignalEvent);
11641164
if (event) {
11651165
dstAllocationStruct.needsFlush &= !event->signalScope;
@@ -1255,7 +1255,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyRegion(void *d
12551255
}
12561256

12571257
const auto &hwInfo = this->device->getHwInfo();
1258-
if (NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo)) {
1258+
if (NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo)) {
12591259
auto event = Event::fromHandle(hSignalEvent);
12601260
if (event) {
12611261
dstAllocationStruct.needsFlush &= !event->signalScope;
@@ -1595,7 +1595,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryFill(void *ptr,
15951595
appendEventForProfilingAllWalkers(hSignalEvent, false);
15961596

15971597
const auto &hwInfo = this->device->getHwInfo();
1598-
if (NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo)) {
1598+
if (NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo)) {
15991599
auto event = Event::fromHandle(hSignalEvent);
16001600
if (event) {
16011601
hostPointerNeedsFlush &= !event->signalScope;
@@ -1691,7 +1691,7 @@ void CommandListCoreFamily<gfxCoreFamily>::appendSignalEventPostWalker(ze_event_
16911691
} else {
16921692
increaseCommandStreamSpace(NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForPipeControlWithPostSyncOperation(hwInfo));
16931693
NEO::PipeControlArgs args;
1694-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(event->signalScope, hwInfo);
1694+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(event->signalScope, hwInfo);
16951695
if (this->partitionCount > 1) {
16961696
args.workloadPartitionOffset = true;
16971697
event->setPacketsInUse(this->partitionCount);
@@ -1846,7 +1846,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendSignalEvent(ze_event_han
18461846
} else {
18471847
NEO::PipeControlArgs args;
18481848
bool applyScope = event->signalScope;
1849-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(applyScope, hwInfo);
1849+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(applyScope, hwInfo);
18501850
if (this->partitionCount > 1) {
18511851
args.workloadPartitionOffset = true;
18521852
event->setPacketsInUse(this->partitionCount);
@@ -1907,7 +1907,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendWaitOnEvents(uint32_t nu
19071907
bool dcFlushRequired = false;
19081908

19091909
const auto &hwInfo = this->device->getHwInfo();
1910-
if (NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo)) {
1910+
if (NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo)) {
19111911
for (uint32_t i = 0; i < numEvents; i++) {
19121912
auto event = Event::fromHandle(phEvent[i]);
19131913
dcFlushRequired |= !!event->waitScope;
@@ -2035,7 +2035,7 @@ void CommandListCoreFamily<gfxCoreFamily>::appendEventForProfiling(ze_event_hand
20352035
} else {
20362036
const auto &hwInfo = this->device->getHwInfo();
20372037
NEO::PipeControlArgs args;
2038-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(event->signalScope, hwInfo);
2038+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(event->signalScope, hwInfo);
20392039
NEO::MemorySynchronizationCommands<GfxFamily>::setPostSyncExtraProperties(args,
20402040
hwInfo);
20412041

@@ -2317,7 +2317,7 @@ template <GFXCORE_FAMILY gfxCoreFamily>
23172317
void CommandListCoreFamily<gfxCoreFamily>::programStateBaseAddress(NEO::CommandContainer &container, bool genericMediaStateClearRequired) {
23182318
const auto &hwInfo = this->device->getHwInfo();
23192319
NEO::PipeControlArgs args;
2320-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
2320+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
23212321
args.hdcPipelineFlush = true;
23222322
args.textureCacheInvalidationEnable = true;
23232323
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(), args);

level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendSignalEvent(ze_
285285
} else {
286286
const auto &hwInfo = this->device->getHwInfo();
287287
NEO::PipeControlArgs args;
288-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(event->signalScope, hwInfo);
288+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(event->signalScope, hwInfo);
289289
this->csr->flushNonKernelTask(&event->getAllocation(this->device), event->getGpuAddress(this->device), Event::STATE_SIGNALED, args, false, false, false);
290290
if (this->isSyncModeQueue) {
291291
auto timeoutMicroseconds = NEO::TimeoutControls::maxTimeout;
@@ -317,7 +317,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendEventReset(ze_e
317317
} else {
318318
const auto &hwInfo = this->device->getHwInfo();
319319
NEO::PipeControlArgs args;
320-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(event->signalScope, hwInfo);
320+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(event->signalScope, hwInfo);
321321
this->csr->flushNonKernelTask(&event->getAllocation(this->device), event->getGpuAddress(this->device), Event::STATE_CLEARED, args, false, false, false);
322322
if (this->isSyncModeQueue) {
323323
auto timeoutMicroseconds = NEO::TimeoutControls::maxTimeout;
@@ -373,7 +373,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendWaitOnEvents(ui
373373
} else {
374374
bool dcFlushRequired = false;
375375
const auto &hwInfo = this->device->getHwInfo();
376-
if (NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo)) {
376+
if (NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo)) {
377377
for (uint32_t i = 0; i < numEvents; i++) {
378378
auto event = Event::fromHandle(phWaitEvents[i]);
379379
dcFlushRequired |= (!event->waitScope) ? false : true;

level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(z
168168
auto event = Event::fromHandle(hEvent);
169169
eventAlloc = &event->getAllocation(this->device);
170170
commandContainer.addToResidencyContainer(eventAlloc);
171-
L3FlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(event->signalScope, hwInfo);
171+
L3FlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(event->signalScope, hwInfo);
172172
isTimestampEvent = event->isEventTimestampFlagSet();
173173
eventAddress = event->getPacketAddress(this->device);
174174
}

level_zero/core/source/cmdqueue/cmdqueue_hw.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
434434
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(child, fence->getGpuAddress(), Fence::STATE_SIGNALED, args, hwInfo);
435435
} else {
436436
NEO::PipeControlArgs args;
437-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
437+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
438438
if (partitionCount > 1) {
439439
args.workloadPartitionOffset = true;
440440
}
@@ -578,7 +578,7 @@ void CommandQueueHw<gfxCoreFamily>::dispatchTaskCountWrite(NEO::LinearStream &co
578578
NEO::EncodeMiFlushDW<GfxFamily>::programMiFlushDw(commandStream, gpuAddress, taskCountToWrite, args, hwInfo);
579579
} else {
580580
NEO::PipeControlArgs args;
581-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
581+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
582582
if (partitionCount > 1) {
583583
args.workloadPartitionOffset = true;
584584
}

level_zero/core/source/cmdqueue/cmdqueue_hw_base.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool
3636

3737
const auto &hwInfo = this->device->getHwInfo();
3838
NEO::PipeControlArgs pcArgs;
39-
pcArgs.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
39+
pcArgs.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
4040
pcArgs.textureCacheInvalidationEnable = true;
4141

4242
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(commandStream, pcArgs);

level_zero/core/source/cmdqueue/cmdqueue_xe_hp_core_and_later.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool
2929
auto globalHeapsBase = neoDevice->getBindlessHeapsHelper()->getGlobalHeapsBase();
3030
auto &hwInfo = neoDevice->getHardwareInfo();
3131
NEO::PipeControlArgs args;
32-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
32+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
3333
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(commandStream, args);
3434
auto pSbaCmd = static_cast<STATE_BASE_ADDRESS *>(commandStream.getSpace(sizeof(STATE_BASE_ADDRESS)));
3535
STATE_BASE_ADDRESS sbaCmd;

level_zero/core/source/gen11/cmdlist_gen11.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void CommandListCoreFamily<gfxCoreFamily>::applyMemoryRangesBarrier(uint32_t num
1515
const void **pRanges) {
1616
const auto &hwInfo = this->device->getHwInfo();
1717
NEO::PipeControlArgs args;
18-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
18+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
1919
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(),
2020
args);
2121
}

level_zero/core/source/gen12lp/definitions/cache_flush_gen12lp.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void CommandListCoreFamily<gfxCoreFamily>::applyMemoryRangesBarrier(uint32_t num
2323
bool supportL3Control = hwInfo.capabilityTable.supportCacheFlushAfterWalker;
2424
if (!supportL3Control) {
2525
NEO::PipeControlArgs args;
26-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
26+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
2727
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(),
2828
args);
2929
} else {

level_zero/core/source/gen9/cmdlist_gen9.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void CommandListCoreFamily<gfxCoreFamily>::applyMemoryRangesBarrier(uint32_t num
2424
const void **pRanges) {
2525
const auto &hwInfo = this->device->getHwInfo();
2626
NEO::PipeControlArgs args;
27-
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::isDcFlushAllowed(true, hwInfo);
27+
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
2828
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(*commandContainer.getCommandStream(),
2929
args);
3030
}

level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ HWTEST2_F(CommandListCreate, givenCommandListAndHostPointersWhenMemoryCopyCalled
407407
cmd = genCmdCast<PIPE_CONTROL *>(*itor);
408408
itor = find<PIPE_CONTROL *>(++itor, genCmdList.end());
409409
}
410-
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::isDcFlushAllowed(true, *defaultHwInfo), cmd->getDcFlushEnable());
410+
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd->getDcFlushEnable());
411411
}
412412

413413
HWTEST2_F(CommandListCreate, givenCommandListAnd2DWhbufferenMemoryCopyRegionCalledThenCopyKernel2DCalled, IsAtLeastSkl) {
@@ -480,7 +480,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyWithSignalEventsThenS
480480
EXPECT_NE(cmdList.end(), itor);
481481
itor++;
482482
itor = find<PIPE_CONTROL *>(itor, cmdList.end());
483-
if (MemorySynchronizationCommands<FamilyType>::isDcFlushAllowed(true, *defaultHwInfo)) {
483+
if (MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo)) {
484484
EXPECT_NE(cmdList.end(), itor);
485485
} else {
486486
EXPECT_EQ(cmdList.end(), itor);
@@ -581,7 +581,7 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyWithSignalEventScopeS
581581

582582
auto it = *(iterator.end() - 1);
583583
auto cmd1 = genCmdCast<PIPE_CONTROL *>(*it);
584-
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::isDcFlushAllowed(true, *defaultHwInfo), cmd1->getDcFlushEnable());
584+
EXPECT_EQ(MemorySynchronizationCommands<FamilyType>::getDcFlushEnable(true, *defaultHwInfo), cmd1->getDcFlushEnable());
585585
}
586586

587587
using ImageSupport = IsWithinProducts<IGFX_SKYLAKE, IGFX_TIGERLAKE_LP>;

0 commit comments

Comments
 (0)