Add debug variable to control media vfe state dss settings.

Change-Id: I7668bd50c81cc9971315e6a635d64a838465b986
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2020-10-21 11:57:13 +02:00
committed by sys_ocldev
parent 19d3fa73bd
commit a06369230c
4 changed files with 17 additions and 0 deletions

View File

@@ -200,3 +200,4 @@ PauseOnGpuMode = -1
PrintTagAllocationAddress = 0
DoNotFlushCaches = false
UseBindlessMode = -1
MediaVfeStateMaxSubSlices = -1

View File

@@ -80,6 +80,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, OverrideRevision, -1, "-1: default, >=0: Revisi
DECLARE_DEBUG_VARIABLE(int32_t, ForceCacheFlushForBcs, -1, "Force cache flush from gpgpu engine before dispatching BCS copy. -1: default, 1: enabled, 0: disabled")
DECLARE_DEBUG_VARIABLE(int32_t, ForceGpgpuSubmissionForBcsEnqueue, -1, "-1: Default, 1: Submit gpgpu command buffer with cache flushing and completion synchronization, 0: Do nothing, if possible")
DECLARE_DEBUG_VARIABLE(int32_t, EnableUsmCompression, -1, "enable compression support for L0 USM Device and Shared Device side: -1 default, 0: disable, 1: enable")
DECLARE_DEBUG_VARIABLE(int32_t, MediaVfeStateMaxSubSlices, -1, ">=0: Programs Media Vfe State Maximum Number of Dual-Subslices to given value ")
/*LOGGING FLAGS*/
DECLARE_DEBUG_VARIABLE(int32_t, PrintDriverDiagnostics, -1, "prints driver diagnostics messages to standard output, value corresponds to hint level")

View File

@@ -88,6 +88,9 @@ void PreambleHelper<TGLLPFamily>::programAdditionalFieldsInVfeState(VFE_STATE_TY
if (!hwHelper.isFusedEuDispatchEnabled(hwInfo)) {
mediaVfeState->setDisableSlice0Subslice2(true);
}
if (DebugManager.flags.MediaVfeStateMaxSubSlices.get() != -1) {
mediaVfeState->setMaximumNumberOfDualSubslices(DebugManager.flags.MediaVfeStateMaxSubSlices.get());
}
}
// Explicitly instantiate PreambleHelper for TGLLP device family

View File

@@ -153,6 +153,18 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenCfeFusedEuDispatchFlagsWhenprogramAdditi
}
}
HWTEST2_F(Gen12LpPreambleVfeState, givenMaxNumberOfDssDebugVariableWhenMediaVfeStateIsProgrammedThenFieldIsSet, IsTGLLP) {
using MEDIA_VFE_STATE = typename FamilyType::MEDIA_VFE_STATE;
DebugManagerStateRestore restorer;
DebugManager.flags.MediaVfeStateMaxSubSlices.set(2);
auto pHwInfo = pPlatform->getClDevice(0)->getRootDeviceEnvironment().getMutableHardwareInfo();
auto pMediaVfeState = reinterpret_cast<MEDIA_VFE_STATE *>(linearStream.getSpace(sizeof(MEDIA_VFE_STATE)));
*pMediaVfeState = FamilyType::cmdInitMediaVfeState;
PreambleHelper<FamilyType>::programAdditionalFieldsInVfeState(pMediaVfeState, *pHwInfo);
EXPECT_EQ(2u, pMediaVfeState->getMaximumNumberOfDualSubslices());
}
typedef PreambleFixture ThreadArbitrationGen12Lp;
GEN12LPTEST_F(ThreadArbitrationGen12Lp, givenPolicyWhenThreadArbitrationProgrammedThenDoNothing) {
LinearStream &cs = linearStream;