diff --git a/shared/source/dll/linux/drm_neo_create.cpp b/shared/source/dll/linux/drm_neo_create.cpp index f2287759c1..fb2adb47d8 100644 --- a/shared/source/dll/linux/drm_neo_create.cpp +++ b/shared/source/dll/linux/drm_neo_create.cpp @@ -65,16 +65,6 @@ Drm *Drm::create(std::unique_ptr &&hwDeviceId, RootDeviceEnvironm printDebugString(debugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Failed to request OCL Turbo Boost\n"); } - if (!drm->queryMemoryInfo()) { - drm->setPerContextVMRequired(true); - printDebugString(debugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Failed to query memory info\n"); - } - - if (!drm->queryEngineInfo()) { - drm->setPerContextVMRequired(true); - printDebugString(debugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Failed to query engine info\n"); - } - drm->checkContextDebugSupport(); drm->queryPageFaultSupport(); diff --git a/shared/source/helpers/hw_info.cpp b/shared/source/helpers/hw_info.cpp index eb514437dc..60d4c86a8a 100644 --- a/shared/source/helpers/hw_info.cpp +++ b/shared/source/helpers/hw_info.cpp @@ -146,7 +146,6 @@ void setupDefaultGtSysInfo(HardwareInfo *hwInfo, const ReleaseHelper *releaseHel gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount; gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount; gtSysInfo->MaxDualSubSlicesSupported = gtSysInfo->DualSubSliceCount; - gtSysInfo->L3BankCount = 1; } if (releaseHelper->getL3BankCount() > 0) { diff --git a/shared/source/os_interface/linux/drm_neo.cpp b/shared/source/os_interface/linux/drm_neo.cpp index 8af5a7ca93..70689a28cd 100644 --- a/shared/source/os_interface/linux/drm_neo.cpp +++ b/shared/source/os_interface/linux/drm_neo.cpp @@ -42,6 +42,7 @@ #include "shared/source/os_interface/os_environment.h" #include "shared/source/os_interface/os_interface.h" #include "shared/source/os_interface/product_helper.h" +#include "shared/source/release_helper/release_helper.h" #include "shared/source/utilities/api_intercept.h" #include "shared/source/utilities/directory.h" #include "shared/source/utilities/io_functions.h" @@ -485,6 +486,18 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl ioctlHelper->setupIpVersion(); rootDeviceEnvironment.initReleaseHelper(); + auto releaseHelper = rootDeviceEnvironment.getReleaseHelper(); + device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); + + if (!queryMemoryInfo()) { + setPerContextVMRequired(true); + printDebugString(debugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Failed to query memory info\n"); + } + + if (!queryEngineInfo()) { + setPerContextVMRequired(true); + printDebugString(debugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Failed to query engine info\n"); + } DrmQueryTopologyData topologyData = {}; bool status = queryTopology(*hwInfo, topologyData); @@ -508,7 +521,12 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl hwInfo->gtSystemInfo.SliceCount = static_cast(topologyData.sliceCount); hwInfo->gtSystemInfo.SubSliceCount = static_cast(topologyData.subSliceCount); hwInfo->gtSystemInfo.DualSubSliceCount = static_cast(topologyData.subSliceCount); + hwInfo->gtSystemInfo.EUCount = static_cast(topologyData.euCount); + + auto numThreadsPerEu = releaseHelper ? releaseHelper->getNumThreadsPerEu() : 7u; + + hwInfo->gtSystemInfo.ThreadCount = numThreadsPerEu * hwInfo->gtSystemInfo.EUCount; if (topologyData.maxSlices * topologyData.maxSubSlicesPerSlice > 0) { hwInfo->gtSystemInfo.MaxSubSlicesSupported = static_cast(topologyData.maxSlices * topologyData.maxSubSlicesPerSlice); hwInfo->gtSystemInfo.MaxDualSubSlicesSupported = static_cast(topologyData.maxSlices * topologyData.maxSubSlicesPerSlice); @@ -525,8 +543,6 @@ int Drm::setupHardwareInfo(const DeviceDescriptor *device, bool setupFeatureTabl } status = querySystemInfo(); - auto releaseHelper = rootDeviceEnvironment.getReleaseHelper(); - device->setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper); rootDeviceEnvironment.setRcsExposure(); if (status) { diff --git a/shared/test/unit_test/helpers/hw_info_tests.cpp b/shared/test/unit_test/helpers/hw_info_tests.cpp index 9aa9060666..e687b71a6b 100644 --- a/shared/test/unit_test/helpers/hw_info_tests.cpp +++ b/shared/test/unit_test/helpers/hw_info_tests.cpp @@ -20,7 +20,7 @@ TEST(HwInfoTest, givenReleaseHelperWithL3BankConfigWhenSetupDefaultHwInfoThenL3C setupDefaultGtSysInfo(&hwInfo, &releaseHelper); - EXPECT_EQ_VAL(1u, hwInfo.gtSystemInfo.L3BankCount); + EXPECT_EQ_VAL(0u, hwInfo.gtSystemInfo.L3BankCount); EXPECT_EQ_VAL(1u, hwInfo.gtSystemInfo.L3CacheSizeInKb); releaseHelper.getL3BankCountResult = 0; @@ -28,8 +28,8 @@ TEST(HwInfoTest, givenReleaseHelperWithL3BankConfigWhenSetupDefaultHwInfoThenL3C setupDefaultGtSysInfo(&hwInfo, &releaseHelper); - EXPECT_EQ_VAL(1u, hwInfo.gtSystemInfo.L3BankCount); - EXPECT_EQ_VAL(4u, hwInfo.gtSystemInfo.L3CacheSizeInKb); + EXPECT_EQ_VAL(0u, hwInfo.gtSystemInfo.L3BankCount); + EXPECT_EQ_VAL(0u, hwInfo.gtSystemInfo.L3CacheSizeInKb); releaseHelper.getL3BankCountResult = 2; releaseHelper.getL3CacheBankSizeInKbResult = 0; diff --git a/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp b/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp index 5e723585ce..edc75b749f 100644 --- a/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/drm_system_info_tests.cpp @@ -84,7 +84,7 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFalseThenSystem EXPECT_EQ(nullptr, drm.getSystemInfo()); EXPECT_TRUE(isEmpty(::testing::internal::GetCapturedStdout())); - EXPECT_TRUE(isEmpty(::testing::internal::GetCapturedStderr())); + EXPECT_FALSE(isEmpty(::testing::internal::GetCapturedStderr())); } TEST(DrmSystemInfoTest, whenSetupHardwareInfoThenReleaseHelperContainsCorrectIpVersion) { @@ -233,7 +233,7 @@ TEST(DrmSystemInfoTest, givenSetupHardwareInfoWhenQuerySystemInfoFailsThenSystem if (productHelper.isPlatformQuerySupported()) { EXPECT_TRUE(hasSubstr(::testing::internal::GetCapturedStderr(), "Size got from PRELIM_DRM_I915_QUERY_HW_IP_VERSION query does not match PrelimI915::prelim_drm_i915_query_hw_ip_version size\n")); } else { - EXPECT_TRUE(::testing::internal::GetCapturedStderr().empty()); + EXPECT_FALSE(::testing::internal::GetCapturedStderr().empty()); } } diff --git a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp index 51eb596e55..7012ab2d1e 100644 --- a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp +++ b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp @@ -167,8 +167,6 @@ HWTEST2_F(XeLpgHwInfoTests, GivenEmptyHwInfoForUnitTestsWhenSetupHardwareInfoIsC EXPECT_GT_VAL(gtSystemInfo.MaxSlicesSupported, 0u); EXPECT_GT_VAL(gtSystemInfo.MaxSubSlicesSupported, 0u); - EXPECT_GT_VAL(gtSystemInfo.L3BankCount, 0u); - EXPECT_TRUE(gtSystemInfo.CCSInfo.IsValid); EXPECT_GT_VAL(gtSystemInfo.CCSInfo.NumberOfCCSEnabled, 0u);