Skip to content

Commit 0564a41

Browse files
feature: debug flag to control direct submission semaphore mode
Related-To: HSD-18039521047 Signed-off-by: Bartosz Dunajski <[email protected]>
1 parent f857d93 commit 0564a41

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

shared/source/debug_settings/debug_variables_base.inl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionRelaxedOrderingQueueSizeLimit, -
437437
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionRelaxedOrderingMinNumberOfClients, -1, "-1: default, >0: Enables RelaxedOrdering mode only if specified number of clients is assigned to given CSR.")
438438
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionMonitorFenceInputPolicy, -1, "-1: default, 0: stalling command flag, 1: explicit monitor fence flag. Selects policy to dispatch monitor fence upon input flag, either for every stalling command or explicit motor fence dispatch")
439439
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionPrintSemaphoreUsage, -1, "-1: default, 0: disabled, 1: enabled. If set, print DirectSubmission semaphore programming and unlocking")
440+
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionSwitchSemaphoreMode, -1, "-1: default, 1: enable switch on unsuccessful, 0: disable switch on unsuccessful")
440441
DECLARE_DEBUG_VARIABLE(bool, DirectSubmissionPrintBuffers, false, "Print address of submitted command buffers")
441442
DECLARE_DEBUG_VARIABLE(int32_t, WaitForPagingFenceInController, -1, "Instead of waiting for paging fence on user thread, program additional semaphore which will be signaled by direct submission controller when paging fence reaches required value -1: default, 0 - disable, 1 - enable.")
442443

shared/source/direct_submission/direct_submission_hw.inl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,10 +567,16 @@ inline void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchSemaphoreSection(
567567
if (this->relaxedOrderingEnabled && this->relaxedOrderingSchedulerRequired) {
568568
dispatchRelaxedOrderingSchedulerSection(value);
569569
} else {
570+
bool switchOnUnsuccessful = false;
571+
572+
if (debugManager.flags.DirectSubmissionSwitchSemaphoreMode.get() != -1) {
573+
switchOnUnsuccessful = !!debugManager.flags.DirectSubmissionSwitchSemaphoreMode.get();
574+
}
575+
570576
EncodeSemaphore<GfxFamily>::addMiSemaphoreWaitCommand(ringCommandStream,
571577
semaphoreGpuVa,
572578
value,
573-
COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD, false, false, false, false, nullptr);
579+
COMPARE_OPERATION::COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD, false, false, false, switchOnUnsuccessful, nullptr);
574580
}
575581

576582
if (miMemFenceRequired) {

shared/test/common/test_files/igdrcl.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,4 +626,5 @@ DirectSubmissionPrintSemaphoreUsage = -1
626626
ForceNonCoherentModeForTimestamps = 0
627627
ExperimentalUSMAllocationReuseVersion = -1
628628
ForceNonWalkerSplitMemoryCopy = -1
629+
DirectSubmissionSwitchSemaphoreMode = -1
629630
# Please don't edit below this line

0 commit comments

Comments
 (0)