Pass FtrWddm2GpuMmu flag to GMM

Change-Id: Ie52f1889a2ce1ab7abab8ac39a5dc6f0e60c6bcf
This commit is contained in:
Dunajski, Bartosz
2018-01-08 14:26:06 +01:00
committed by sys_ocldev
parent f235ba015e
commit 11e7a5f1d9
5 changed files with 181 additions and 22 deletions

View File

@@ -766,3 +766,113 @@ HWTEST_F(WddmWithMockGdiTest, givenOpenSharedHandleWhenZeroAllocationsThenReturn
EXPECT_EQ(false, ret);
}
TEST(WddmWTest, givenAdapterInfoWhenInitializingThenUpdateFtrTable) {
FeatureTable refFeatureTable = {};
FeatureTable requestedFeatureTable = {};
ADAPTER_INFO adapterInfo = {};
memset(&adapterInfo.SkuTable, ~0, sizeof(adapterInfo.SkuTable));
Wddm::setupFeatureTableFromAdapterInfo(&requestedFeatureTable, &adapterInfo);
refFeatureTable.ftrDesktop = true;
refFeatureTable.ftrChannelSwizzlingXOREnabled = true;
refFeatureTable.ftrGtBigDie = true;
refFeatureTable.ftrGtMediumDie = true;
refFeatureTable.ftrGtSmallDie = true;
refFeatureTable.ftrGT1 = true;
refFeatureTable.ftrGT1_5 = true;
refFeatureTable.ftrGT2 = true;
refFeatureTable.ftrGT2_5 = true;
refFeatureTable.ftrGT3 = true;
refFeatureTable.ftrGT4 = true;
refFeatureTable.ftrIVBM0M1Platform = true;
refFeatureTable.ftrSGTPVSKUStrapPresent = true;
refFeatureTable.ftrGTA = true;
refFeatureTable.ftrGTC = true;
refFeatureTable.ftrGTX = true;
refFeatureTable.ftr5Slice = true;
refFeatureTable.ftrGpGpuMidBatchPreempt = true;
refFeatureTable.ftrGpGpuThreadGroupLevelPreempt = true;
refFeatureTable.ftrGpGpuMidThreadLevelPreempt = true;
refFeatureTable.ftrIoMmuPageFaulting = true;
refFeatureTable.ftrWddm2Svm = true;
refFeatureTable.ftrPooledEuEnabled = true;
refFeatureTable.ftrResourceStreamer = true;
refFeatureTable.ftrPPGTT = true;
refFeatureTable.ftrSVM = true;
refFeatureTable.ftrEDram = true;
refFeatureTable.ftrL3IACoherency = true;
refFeatureTable.ftrIA32eGfxPTEs = true;
refFeatureTable.ftr3dMidBatchPreempt = true;
refFeatureTable.ftr3dObjectLevelPreempt = true;
refFeatureTable.ftrPerCtxtPreemptionGranularityControl = true;
refFeatureTable.ftrDisplayYTiling = true;
refFeatureTable.ftrTranslationTable = true;
refFeatureTable.ftrUserModeTranslationTable = true;
refFeatureTable.ftrEnableGuC = true;
refFeatureTable.ftrFbc = true;
refFeatureTable.ftrFbc2AddressTranslation = true;
refFeatureTable.ftrFbcBlitterTracking = true;
refFeatureTable.ftrFbcCpuTracking = true;
refFeatureTable.ftrVcs2 = true;
refFeatureTable.ftrVEBOX = true;
refFeatureTable.ftrSingleVeboxSlice = true;
refFeatureTable.ftrULT = true;
refFeatureTable.ftrLCIA = true;
refFeatureTable.ftrGttCacheInvalidation = true;
refFeatureTable.ftrTileMappedResource = true;
refFeatureTable.ftrAstcHdr2D = true;
refFeatureTable.ftrAstcLdr2D = true;
refFeatureTable.ftrStandardMipTailFormat = true;
refFeatureTable.ftrFrameBufferLLC = true;
refFeatureTable.ftrCrystalwell = true;
refFeatureTable.ftrLLCBypass = true;
refFeatureTable.ftrDisplayEngineS3d = true;
refFeatureTable.ftrVERing = true;
refFeatureTable.ftrWddm2GpuMmu = true;
EXPECT_TRUE(memcmp(&requestedFeatureTable, &refFeatureTable, sizeof(FeatureTable)) == 0);
}
TEST(WddmWTest, givenAdapterInfoWhenInitializingThenUpdateWaTable) {
WorkaroundTable refWaTable = {};
WorkaroundTable requestedWaTable = {};
ADAPTER_INFO adapterInfo = {};
memset(&adapterInfo.WaTable, ~0, sizeof(adapterInfo.WaTable));
Wddm::setupWorkaroundTableFromAdapterInfo(&requestedWaTable, &adapterInfo);
refWaTable.waDoNotUseMIReportPerfCount = true;
refWaTable.waEnablePreemptionGranularityControlByUMD = true;
refWaTable.waSendMIFLUSHBeforeVFE = true;
refWaTable.waReportPerfCountUseGlobalContextID = true;
refWaTable.waDisableLSQCROPERFforOCL = true;
refWaTable.waMsaa8xTileYDepthPitchAlignment = true;
refWaTable.waLosslessCompressionSurfaceStride = true;
refWaTable.waFbcLinearSurfaceStride = true;
refWaTable.wa4kAlignUVOffsetNV12LinearSurface = true;
refWaTable.waEncryptedEdramOnlyPartials = true;
refWaTable.waDisableEdramForDisplayRT = true;
refWaTable.waForcePcBbFullCfgRestore = true;
refWaTable.waCompressedResourceRequiresConstVA21 = true;
refWaTable.waDisablePerCtxtPreemptionGranularityControl = true;
refWaTable.waLLCCachingUnsupported = true;
refWaTable.waUseVAlign16OnTileXYBpp816 = true;
refWaTable.waModifyVFEStateAfterGPGPUPreemption = true;
refWaTable.waCSRUncachable = true;
EXPECT_TRUE(memcmp(&requestedWaTable, &refWaTable, sizeof(WorkaroundTable)) == 0);
}