Add support for testing if L3 is configurable
Change-Id: I639e28171d0009566d7a2f04cac679d14f0340b1 Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
This commit is contained in:
parent
cb73ea7361
commit
a103ce177e
|
@ -31,6 +31,11 @@ uint32_t PreambleHelper<BDWFamily>::getL3Config(const HardwareInfo &hwInfo, bool
|
|||
return l3Config;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool PreambleHelper<BDWFamily>::isL3Configurable(const HardwareInfo &hwInfo) {
|
||||
return getL3Config(hwInfo, true) != getL3Config(hwInfo, false);
|
||||
}
|
||||
|
||||
template <>
|
||||
void PreambleHelper<BDWFamily>::programPipelineSelect(LinearStream *pCommandStream,
|
||||
const DispatchFlags &dispatchFlags,
|
||||
|
|
|
@ -27,6 +27,11 @@ uint32_t PreambleHelper<SKLFamily>::getL3Config(const HardwareInfo &hwInfo, bool
|
|||
return l3Config;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool PreambleHelper<SKLFamily>::isL3Configurable(const HardwareInfo &hwInfo) {
|
||||
return getL3Config(hwInfo, true) != getL3Config(hwInfo, false);
|
||||
}
|
||||
|
||||
template <>
|
||||
void PreambleHelper<SKLFamily>::programPipelineSelect(LinearStream *pCommandStream,
|
||||
const DispatchFlags &dispatchFlags,
|
||||
|
|
|
@ -43,6 +43,7 @@ struct PreambleHelper {
|
|||
uint32_t requiredThreadArbitrationPolicy, GraphicsAllocation *preemptionCsr);
|
||||
static void programKernelDebugging(LinearStream *pCommandStream);
|
||||
static uint32_t getL3Config(const HardwareInfo &hwInfo, bool useSLM);
|
||||
static bool isL3Configurable(const HardwareInfo &hwInfo);
|
||||
static size_t getAdditionalCommandsSize(const Device &device);
|
||||
static size_t getThreadArbitrationCommandsSize();
|
||||
static size_t getVFECommandsSize();
|
||||
|
|
|
@ -82,4 +82,9 @@ size_t PreambleHelper<GfxFamily>::getKernelDebuggingCommandsSize(bool debuggingA
|
|||
return 0;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool PreambleHelper<GfxFamily>::isL3Configurable(const HardwareInfo &hwInfo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -40,6 +40,13 @@ GEN11TEST_F(IclSlm, givenGen11WhenProgramingL3ThenErrorDetectionBehaviorControlB
|
|||
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
|
||||
}
|
||||
|
||||
GEN11TEST_F(IclSlm, givenGen11IsL3Programing) {
|
||||
bool isL3Programmable =
|
||||
PreambleHelper<FamilyType>::isL3Configurable(**platformDevices);
|
||||
|
||||
EXPECT_FALSE(isL3Programmable);
|
||||
}
|
||||
|
||||
typedef PreambleFixture Gen11UrbEntryAllocationSize;
|
||||
GEN11TEST_F(Gen11UrbEntryAllocationSize, getUrbEntryAllocationSize) {
|
||||
uint32_t actualVal = PreambleHelper<FamilyType>::getUrbEntryAllocationSize();
|
||||
|
|
|
@ -57,6 +57,19 @@ BDWTEST_F(Gen8L3Config, checkSLM) {
|
|||
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
|
||||
}
|
||||
|
||||
BDWTEST_F(Gen8L3Config, givenGen8IsL3Programing) {
|
||||
bool l3ConfigDifference;
|
||||
bool isL3Programmable;
|
||||
|
||||
l3ConfigDifference =
|
||||
PreambleHelper<BDWFamily>::getL3Config(**platformDevices, true) !=
|
||||
PreambleHelper<BDWFamily>::getL3Config(**platformDevices, false);
|
||||
isL3Programmable =
|
||||
PreambleHelper<BDWFamily>::isL3Configurable(**platformDevices);
|
||||
|
||||
EXPECT_EQ(l3ConfigDifference, isL3Programmable);
|
||||
}
|
||||
|
||||
typedef PreambleFixture ThreadArbitrationGen8;
|
||||
BDWTEST_F(ThreadArbitrationGen8, givenPolicyWhenThreadArbitrationProgrammedThenDoNothing) {
|
||||
typedef BDWFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
|
|
|
@ -48,3 +48,16 @@ GEN9TEST_F(PreambleTestGen9, givenDisabledPreemptionAndDisabledDebuggingWhenPrea
|
|||
GEN9TEST_F(PreambleTestGen9, givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAreInlcuded) {
|
||||
SourceLevelDebuggerPreambleTest<FamilyType>::givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAreInlcudedTest();
|
||||
}
|
||||
|
||||
GEN9TEST_F(PreambleTestGen9, givenGen9IsL3Programing) {
|
||||
bool l3ConfigDifference;
|
||||
bool isL3Programmable;
|
||||
|
||||
l3ConfigDifference =
|
||||
PreambleHelper<FamilyType>::getL3Config(**platformDevices, true) !=
|
||||
PreambleHelper<FamilyType>::getL3Config(**platformDevices, false);
|
||||
isL3Programmable =
|
||||
PreambleHelper<FamilyType>::isL3Configurable(**platformDevices);
|
||||
|
||||
EXPECT_EQ(l3ConfigDifference, isL3Programmable);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue