Add debug flag for low priority ULLS BCS
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
75f3b416ae
commit
0c8080ac26
|
@ -251,6 +251,23 @@ TEST(DrmTest, givenDirectSubmissionEnabledOnBlitterWhenCreateBcsEngineThenLowPri
|
|||
EXPECT_EQ(4u, drmMock.receivedContextParamRequestCount);
|
||||
}
|
||||
|
||||
TEST(DrmTest, givenDirectSubmissionEnabledOnBlitterAndDirectSubmissionLowPriorityBlitterSetZeroWhenCreateBcsEngineThenLowPriorityIsNotSet) {
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
DrmMock drmMock(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
|
||||
OsContextLinux osContext(drmMock, 0u, 1, EngineTypeUsage{aub_stream::ENGINE_BCS, EngineUsage::Regular}, PreemptionMode::Disabled, false);
|
||||
EXPECT_EQ(1u, drmMock.receivedContextParamRequestCount);
|
||||
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.EnableDirectSubmission.set(1);
|
||||
DebugManager.flags.DirectSubmissionOverrideBlitterSupport.set(1);
|
||||
DebugManager.flags.DirectSubmissionLowPriorityBlitter.set(0);
|
||||
|
||||
OsContextLinux osContext2(drmMock, 0u, 1, EngineTypeUsage{aub_stream::ENGINE_BCS, EngineUsage::Regular}, PreemptionMode::Disabled, false);
|
||||
EXPECT_EQ(2u, drmMock.receivedContextParamRequestCount);
|
||||
}
|
||||
|
||||
TEST(DrmTest, WhenGettingExecSoftPinThenCorrectValueIsReturned) {
|
||||
auto executionEnvironment = std::make_unique<ExecutionEnvironment>();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
|
|
|
@ -196,6 +196,7 @@ ZebinIgnoreIcbeVersion = 0
|
|||
LogWaitingForCompletion = 0
|
||||
ForceUserptrAlignment = -1
|
||||
UseExternalAllocatorForSshAndDsh = 0
|
||||
DirectSubmissionLowPriorityBlitter = -1
|
||||
DirectSubmissionOverrideBlitterSupport = -1
|
||||
DirectSubmissionOverrideRenderSupport = -1
|
||||
DirectSubmissionOverrideComputeSupport = -1
|
||||
|
|
|
@ -157,6 +157,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionSemaphoreAddressing, -1, "-1: do
|
|||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionDisableCpuCacheFlush, -1, "-1: do not override, 0: disable, 1: enable")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionEnableDebugBuffer, 0, "0: diagnostic feature disabled - dispatch regular workload, 1: dispatch diagnostic buffer - mode 1 - single SDI command, 2: dispatch diagnostic buffer - mode 2 - no command")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionDiagnosticExecutionCount, 30, "Number of executions of EnableDebugBuffer modes within diagnostic run")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionLowPriorityBlitter, -1, "Create low priority context for blitter: -1: default, when direct submission enabled on BCS, 0: disable, create normal drm context 1: enable, create low priority context for BCS")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideBlitterSupport, -1, "Overrides default blitter support: -1: do not override, 0: disable engine support, 1: enable engine support with init start, 2: enable engine support without init start")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideRenderSupport, -1, "Overrides default render support: -1: do not override, 0: disable engine support, 1: enable engine support with init start, 2: enable engine support without init start")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, DirectSubmissionOverrideComputeSupport, -1, "Overrides default compute support: -1: do not override, 0: disable engine support, 1: enable engine support with init start, 2: enable engine support without init start")
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "shared/source/os_interface/linux/os_context_linux.h"
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/engine_node_helper.h"
|
||||
|
@ -51,8 +52,14 @@ OsContextLinux::OsContextLinux(Drm &drm, uint32_t contextId, DeviceBitfield devi
|
|||
drm.setContextDebugFlag(drmContextId);
|
||||
}
|
||||
|
||||
auto lowPriorityDirectSubmissionBcs = this->isDirectSubmissionActive() && EngineHelpers::isBcs(engineType);
|
||||
|
||||
if (DebugManager.flags.DirectSubmissionLowPriorityBlitter.get() != -1) {
|
||||
lowPriorityDirectSubmissionBcs = DebugManager.flags.DirectSubmissionLowPriorityBlitter.get();
|
||||
}
|
||||
|
||||
if ((drm.isPreemptionSupported() && isLowPriority()) ||
|
||||
(this->isDirectSubmissionActive() && EngineHelpers::isBcs(engineType))) {
|
||||
lowPriorityDirectSubmissionBcs) {
|
||||
drm.setLowPriorityContextParam(drmContextId);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue