fix: update slm size in capability table based on gt system info
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
parent
ac1ba09911
commit
e624a4b0ab
|
@ -930,6 +930,10 @@ void Drm::setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo) {
|
||||||
gtSysInfo->MaxDualSubSlicesSupported = sysInfo->getMaxDualSubSlicesSupported();
|
gtSysInfo->MaxDualSubSlicesSupported = sysInfo->getMaxDualSubSlicesSupported();
|
||||||
gtSysInfo->CsrSizeInMb = sysInfo->getCsrSizeInMb();
|
gtSysInfo->CsrSizeInMb = sysInfo->getCsrSizeInMb();
|
||||||
gtSysInfo->SLMSizeInKb = sysInfo->getSlmSizePerDss();
|
gtSysInfo->SLMSizeInKb = sysInfo->getSlmSizePerDss();
|
||||||
|
|
||||||
|
if (gtSysInfo->SLMSizeInKb) {
|
||||||
|
hwInfo->capabilityTable.slmSize = gtSysInfo->SLMSizeInKb;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Drm::setupCacheInfo(const HardwareInfo &hwInfo) {
|
void Drm::setupCacheInfo(const HardwareInfo &hwInfo) {
|
||||||
|
|
|
@ -110,6 +110,7 @@ bool Wddm::init() {
|
||||||
hardwareInfo->capabilityTable.instrumentationEnabled =
|
hardwareInfo->capabilityTable.instrumentationEnabled =
|
||||||
(hardwareInfo->capabilityTable.instrumentationEnabled && instrumentationEnabled);
|
(hardwareInfo->capabilityTable.instrumentationEnabled && instrumentationEnabled);
|
||||||
|
|
||||||
|
hardwareInfo->capabilityTable.slmSize = gtSystemInfo->SLMSizeInKb;
|
||||||
rootDeviceEnvironment.initProductHelper();
|
rootDeviceEnvironment.initProductHelper();
|
||||||
rootDeviceEnvironment.initCompilerProductHelper();
|
rootDeviceEnvironment.initCompilerProductHelper();
|
||||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||||
|
|
|
@ -245,13 +245,16 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsThenSys
|
||||||
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
|
hwInfo.capabilityTable.slmSize = 0x1234678u;
|
||||||
|
|
||||||
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
auto setupHardwareInfo = [](HardwareInfo *, bool, const ReleaseHelper *) {};
|
||||||
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
DeviceDescriptor device = {0, &hwInfo, setupHardwareInfo};
|
||||||
|
|
||||||
int ret = drm.setupHardwareInfo(&device, false);
|
int ret = drm.setupHardwareInfo(&device, false);
|
||||||
EXPECT_EQ(ret, 0);
|
EXPECT_EQ(ret, 0);
|
||||||
EXPECT_NE(nullptr, drm.getSystemInfo());
|
EXPECT_NE(nullptr, drm.getSystemInfo());
|
||||||
const auto >SystemInfo = executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo()->gtSystemInfo;
|
const auto &newHwInfo = *executionEnvironment->rootDeviceEnvironments[0]->getHardwareInfo();
|
||||||
|
const auto >SystemInfo = newHwInfo.gtSystemInfo;
|
||||||
|
|
||||||
EXPECT_GT(gtSystemInfo.MaxEuPerSubSlice, 0u);
|
EXPECT_GT(gtSystemInfo.MaxEuPerSubSlice, 0u);
|
||||||
EXPECT_GT(gtSystemInfo.MaxSlicesSupported, 0u);
|
EXPECT_GT(gtSystemInfo.MaxSlicesSupported, 0u);
|
||||||
|
@ -260,6 +263,8 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsThenSys
|
||||||
EXPECT_GT(gtSystemInfo.MemoryType, 0u);
|
EXPECT_GT(gtSystemInfo.MemoryType, 0u);
|
||||||
EXPECT_EQ(gtSystemInfo.CsrSizeInMb, drm.getSystemInfo()->getCsrSizeInMb());
|
EXPECT_EQ(gtSystemInfo.CsrSizeInMb, drm.getSystemInfo()->getCsrSizeInMb());
|
||||||
EXPECT_EQ(gtSystemInfo.SLMSizeInKb, drm.getSystemInfo()->getSlmSizePerDss());
|
EXPECT_EQ(gtSystemInfo.SLMSizeInKb, drm.getSystemInfo()->getSlmSizePerDss());
|
||||||
|
EXPECT_NE(newHwInfo.capabilityTable.slmSize, hwInfo.capabilityTable.slmSize);
|
||||||
|
EXPECT_EQ(newHwInfo.capabilityTable.slmSize, drm.getSystemInfo()->getSlmSizePerDss());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsThenSystemInfoIsCreatedAndHardwareInfoSetProperlyBasedOnBlobData) {
|
TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoSucceedsThenSystemInfoIsCreatedAndHardwareInfoSetProperlyBasedOnBlobData) {
|
||||||
|
|
|
@ -72,6 +72,12 @@ TEST_F(Wddm20Tests, GivenExisitingContextWhenInitializingWddmThenCreateContextRe
|
||||||
EXPECT_EQ(1u, wddm->createContextResult.called);
|
EXPECT_EQ(1u, wddm->createContextResult.called);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(Wddm20Tests, whenInitializingWddmThenSlmSizeInCapabilityTableIsSameAsInGtSystemInfo) {
|
||||||
|
wddm->init();
|
||||||
|
auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
|
||||||
|
EXPECT_EQ(hwInfo->gtSystemInfo.SLMSizeInKb, hwInfo->capabilityTable.slmSize);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(Wddm20Tests, givenNullPageTableManagerAndCompressedResourceWhenMappingGpuVaThenDontUpdateAuxTable) {
|
TEST_F(Wddm20Tests, givenNullPageTableManagerAndCompressedResourceWhenMappingGpuVaThenDontUpdateAuxTable) {
|
||||||
GmmRequirements gmmRequirements{};
|
GmmRequirements gmmRequirements{};
|
||||||
gmmRequirements.allowLargePages = true;
|
gmmRequirements.allowLargePages = true;
|
||||||
|
|
Loading…
Reference in New Issue