fix: update slm size based on gt system info in wddm path

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-10-10 10:11:50 +00:00
committed by Compute-Runtime-Automation
parent 6a8a5bca3b
commit d433fd585a
2 changed files with 4 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ bool Wddm::init() {
hardwareInfo->capabilityTable.instrumentationEnabled = hardwareInfo->capabilityTable.instrumentationEnabled =
(hardwareInfo->capabilityTable.instrumentationEnabled && instrumentationEnabled); (hardwareInfo->capabilityTable.instrumentationEnabled && instrumentationEnabled);
if (!hardwareInfo->capabilityTable.slmSize) { if (gtSystemInfo->SLMSizeInKb > 0) {
hardwareInfo->capabilityTable.slmSize = gtSystemInfo->SLMSizeInKb; hardwareInfo->capabilityTable.slmSize = gtSystemInfo->SLMSizeInKb;
} }
rootDeviceEnvironment.initProductHelper(); rootDeviceEnvironment.initProductHelper();

View File

@@ -85,7 +85,7 @@ TEST_F(Wddm20Tests, whenInitializingWddmAndSlmSizeInCapabilityTableIsNotSetThenS
EXPECT_EQ(outputHwInfo.gtSystemInfo.SLMSizeInKb, inputHwInfo.gtSystemInfo.SLMSizeInKb); EXPECT_EQ(outputHwInfo.gtSystemInfo.SLMSizeInKb, inputHwInfo.gtSystemInfo.SLMSizeInKb);
} }
TEST_F(Wddm20Tests, whenInitializingWddmAndSlmSizeInCapabilityTableIsSetThenItStaysTheSame) { TEST_F(Wddm20Tests, whenInitializingWddmAndSlmSizeInCapabilityTableAndInGtSystemInfoAreSetThenSetupSlmSizeInCapabilityTableBasedOnGtSystemInfo) {
auto inputHwInfo = *defaultHwInfo; auto inputHwInfo = *defaultHwInfo;
inputHwInfo.capabilityTable.slmSize = 0x54321u; inputHwInfo.capabilityTable.slmSize = 0x54321u;
EXPECT_NE(0u, inputHwInfo.gtSystemInfo.SLMSizeInKb); EXPECT_NE(0u, inputHwInfo.gtSystemInfo.SLMSizeInKb);
@@ -94,8 +94,8 @@ TEST_F(Wddm20Tests, whenInitializingWddmAndSlmSizeInCapabilityTableIsSetThenItSt
wddm->init(); wddm->init();
auto &outputHwInfo = *rootDeviceEnvironment->getHardwareInfo(); auto &outputHwInfo = *rootDeviceEnvironment->getHardwareInfo();
EXPECT_NE(outputHwInfo.gtSystemInfo.SLMSizeInKb, outputHwInfo.capabilityTable.slmSize); EXPECT_EQ(outputHwInfo.gtSystemInfo.SLMSizeInKb, outputHwInfo.capabilityTable.slmSize);
EXPECT_EQ(outputHwInfo.capabilityTable.slmSize, inputHwInfo.capabilityTable.slmSize); EXPECT_NE(outputHwInfo.capabilityTable.slmSize, inputHwInfo.capabilityTable.slmSize);
} }
TEST_F(Wddm20Tests, givenNullPageTableManagerAndCompressedResourceWhenMappingGpuVaThenDontUpdateAuxTable) { TEST_F(Wddm20Tests, givenNullPageTableManagerAndCompressedResourceWhenMappingGpuVaThenDontUpdateAuxTable) {