mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
HwInfoConfig cleanup
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
154f7e87be
commit
8dfea40242
@ -5,7 +5,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/helpers/hw_info.h"
|
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.inl"
|
#include "shared/source/os_interface/hw_info_config.inl"
|
||||||
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
||||||
@ -13,28 +12,14 @@
|
|||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
#ifdef SUPPORT_ICLLP
|
#ifdef SUPPORT_ICLLP
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_ICELAKE_LP>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_ICELAKE_LP>;
|
template class HwInfoConfigHw<IGFX_ICELAKE_LP>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUPPORT_LKF
|
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_LAKEFIELD>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#ifdef SUPPORT_LKF
|
||||||
template class HwInfoConfigHw<IGFX_LAKEFIELD>;
|
template class HwInfoConfigHw<IGFX_LAKEFIELD>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SUPPORT_EHL
|
#ifdef SUPPORT_EHL
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_ELKHARTLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_ELKHARTLAKE>;
|
template class HwInfoConfigHw<IGFX_ELKHARTLAKE>;
|
||||||
#endif
|
#endif
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
@ -9,14 +9,5 @@
|
|||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_ALDERLAKE_S>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_ALDERLAKE_S>;
|
template class HwInfoConfigHw<IGFX_ALDERLAKE_S>;
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
@ -6,27 +6,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/helpers/hw_info.h"
|
#include "shared/source/helpers/hw_info.h"
|
||||||
#include "shared/source/helpers/hw_info_config_common_helper.h"
|
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<IGFX_DG1>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<IGFX_DG1>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||||
if (nullptr == osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||||
gtSystemInfo->SliceCount = 1;
|
gtSystemInfo->SliceCount = 1;
|
||||||
|
|
||||||
HwInfoConfigCommonHelper::enableBlitterOperationsSupport(*hwInfo);
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
hwInfo->featureTable.ftrGpGpuMidThreadLevelPreempt = false;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
hwInfo->featureTable.ftrGpGpuMidThreadLevelPreempt = false;
|
||||||
uint64_t HwInfoConfigHw<IGFX_DG1>::getSharedSystemMemCapabilities() {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,13 +12,12 @@ namespace NEO {
|
|||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<IGFX_ROCKETLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<IGFX_ROCKETLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||||
if (nullptr == osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||||
gtSystemInfo->SliceCount = 1;
|
gtSystemInfo->SliceCount = 1;
|
||||||
hwInfo->featureTable.ftrGpGpuMidThreadLevelPreempt = false;
|
hwInfo->featureTable.ftrGpGpuMidThreadLevelPreempt = false;
|
||||||
|
|
||||||
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,14 +12,11 @@ namespace NEO {
|
|||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<IGFX_TIGERLAKE_LP>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<IGFX_TIGERLAKE_LP>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||||
|
|
||||||
if (nullptr == osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||||
gtSystemInfo->SliceCount = 1;
|
gtSystemInfo->SliceCount = 1;
|
||||||
hwInfo->featureTable.ftrGpGpuMidThreadLevelPreempt = false;
|
hwInfo->featureTable.ftrGpGpuMidThreadLevelPreempt = false;
|
||||||
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,47 +5,34 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
|
||||||
#include "shared/source/helpers/hw_info.h"
|
#include "shared/source/helpers/hw_info.h"
|
||||||
#include "shared/source/helpers/hw_info_config_common_helper.h"
|
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.inl"
|
#include "shared/source/os_interface/hw_info_config.inl"
|
||||||
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
namespace Gen12LPCommonFunctions {
|
||||||
|
inline void adjustPlatformForProductFamily(PLATFORM &platform, GFXCORE_FAMILY newCoreFamily) {
|
||||||
|
platform.eRenderCoreFamily = IGFX_GEN12LP_CORE;
|
||||||
|
platform.eDisplayCoreFamily = IGFX_GEN12LP_CORE;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Gen12LPCommonFunctions
|
||||||
|
|
||||||
#ifdef SUPPORT_TGLLP
|
#ifdef SUPPORT_TGLLP
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_TIGERLAKE_LP>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void HwInfoConfigHw<IGFX_TIGERLAKE_LP>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
void HwInfoConfigHw<IGFX_TIGERLAKE_LP>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||||
PLATFORM *platform = &hwInfo->platform;
|
Gen12LPCommonFunctions::adjustPlatformForProductFamily(hwInfo->platform, GFXCORE_FAMILY::IGFX_GEN12LP_CORE);
|
||||||
platform->eRenderCoreFamily = IGFX_GEN12LP_CORE;
|
|
||||||
platform->eDisplayCoreFamily = IGFX_GEN12LP_CORE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_TIGERLAKE_LP>;
|
template class HwInfoConfigHw<IGFX_TIGERLAKE_LP>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUPPORT_DG1
|
#ifdef SUPPORT_DG1
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_DG1>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
HwInfoConfigCommonHelper::enableBlitterOperationsSupport(*hwInfo);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void HwInfoConfigHw<IGFX_DG1>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
void HwInfoConfigHw<IGFX_DG1>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||||
PLATFORM *platform = &hwInfo->platform;
|
Gen12LPCommonFunctions::adjustPlatformForProductFamily(hwInfo->platform, GFXCORE_FAMILY::IGFX_GEN12LP_CORE);
|
||||||
platform->eRenderCoreFamily = IGFX_GEN12LP_CORE;
|
|
||||||
platform->eDisplayCoreFamily = IGFX_GEN12LP_CORE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -53,44 +40,22 @@ bool HwInfoConfigHw<IGFX_DG1>::isEvenContextCountRequired() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
uint64_t HwInfoConfigHw<IGFX_DG1>::getSharedSystemMemCapabilities() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_DG1>;
|
template class HwInfoConfigHw<IGFX_DG1>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUPPORT_RKL
|
#ifdef SUPPORT_RKL
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_ROCKETLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void HwInfoConfigHw<IGFX_ROCKETLAKE>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
void HwInfoConfigHw<IGFX_ROCKETLAKE>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||||
PLATFORM *platform = &hwInfo->platform;
|
Gen12LPCommonFunctions::adjustPlatformForProductFamily(hwInfo->platform, GFXCORE_FAMILY::IGFX_GEN12LP_CORE);
|
||||||
platform->eRenderCoreFamily = IGFX_GEN12LP_CORE;
|
|
||||||
platform->eDisplayCoreFamily = IGFX_GEN12LP_CORE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_ROCKETLAKE>;
|
template class HwInfoConfigHw<IGFX_ROCKETLAKE>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUPPORT_ADLS
|
#ifdef SUPPORT_ADLS
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_ALDERLAKE_S>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.ftrE2ECompression;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void HwInfoConfigHw<IGFX_ALDERLAKE_S>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
void HwInfoConfigHw<IGFX_ALDERLAKE_S>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||||
PLATFORM *platform = &hwInfo->platform;
|
Gen12LPCommonFunctions::adjustPlatformForProductFamily(hwInfo->platform, GFXCORE_FAMILY::IGFX_GEN12LP_CORE);
|
||||||
platform->eRenderCoreFamily = IGFX_GEN12LP_CORE;
|
|
||||||
platform->eDisplayCoreFamily = IGFX_GEN12LP_CORE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_ALDERLAKE_S>;
|
template class HwInfoConfigHw<IGFX_ALDERLAKE_S>;
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/helpers/hw_info.h"
|
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.inl"
|
#include "shared/source/os_interface/hw_info_config.inl"
|
||||||
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
||||||
@ -13,11 +12,6 @@
|
|||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
#ifdef SUPPORT_BDW
|
#ifdef SUPPORT_BDW
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_BROADWELL>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_BROADWELL>;
|
template class HwInfoConfigHw<IGFX_BROADWELL>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "shared/source/helpers/hw_info.h"
|
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.inl"
|
#include "shared/source/os_interface/hw_info_config.inl"
|
||||||
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
||||||
@ -13,43 +12,22 @@
|
|||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
#ifdef SUPPORT_BXT
|
#ifdef SUPPORT_BXT
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_BROXTON>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
template class HwInfoConfigHw<IGFX_BROXTON>;
|
template class HwInfoConfigHw<IGFX_BROXTON>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUPPORT_CFL
|
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_COFFEELAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#ifdef SUPPORT_CFL
|
||||||
template class HwInfoConfigHw<IGFX_COFFEELAKE>;
|
template class HwInfoConfigHw<IGFX_COFFEELAKE>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUPPORT_GLK
|
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_GEMINILAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#ifdef SUPPORT_GLK
|
||||||
template class HwInfoConfigHw<IGFX_GEMINILAKE>;
|
template class HwInfoConfigHw<IGFX_GEMINILAKE>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUPPORT_KBL
|
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_KABYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#ifdef SUPPORT_KBL
|
||||||
template class HwInfoConfigHw<IGFX_KABYLAKE>;
|
template class HwInfoConfigHw<IGFX_KABYLAKE>;
|
||||||
#endif
|
#endif
|
||||||
#ifdef SUPPORT_SKL
|
|
||||||
template <>
|
|
||||||
int HwInfoConfigHw<IGFX_SKYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#ifdef SUPPORT_SKL
|
||||||
template class HwInfoConfigHw<IGFX_SKYLAKE>;
|
template class HwInfoConfigHw<IGFX_SKYLAKE>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||||
#include "shared/source/gmm_helper/resource_info.h"
|
#include "shared/source/gmm_helper/resource_info.h"
|
||||||
#include "shared/source/helpers/aligned_memory.h"
|
#include "shared/source/helpers/aligned_memory.h"
|
||||||
#include "shared/source/helpers/hw_info_config_common_helper.h"
|
|
||||||
#include "shared/source/helpers/string.h"
|
#include "shared/source/helpers/string.h"
|
||||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
@ -1016,10 +1015,15 @@ HWTEST_F(PipeControlHelperTests, WhenProgrammingCacheFlushThenExpectBasicFieldsS
|
|||||||
EXPECT_TRUE(pipeControl->getStateCacheInvalidationEnable());
|
EXPECT_TRUE(pipeControl->getStateCacheInvalidationEnable());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(HwInfoConfigCommonHelperTest, givenBlitterPreferenceWhenEnablingBlitterOperationsSupportThenHonorThePreference) {
|
using HwInfoConfigCommonTest = ::testing::Test;
|
||||||
|
|
||||||
|
HWTEST2_F(HwInfoConfigCommonTest, givenBlitterPreferenceWhenEnablingBlitterOperationsSupportThenHonorThePreference, IsAtLeastGen12lp) {
|
||||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||||
|
|
||||||
HwInfoConfigCommonHelper::enableBlitterOperationsSupport(hardwareInfo);
|
auto hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
||||||
|
|
||||||
|
hwInfoConfig->configureHardwareCustom(&hardwareInfo, nullptr);
|
||||||
|
|
||||||
const auto expectedBlitterSupport = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily).obtainBlitterPreference(hardwareInfo);
|
const auto expectedBlitterSupport = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily).obtainBlitterPreference(hardwareInfo);
|
||||||
EXPECT_EQ(expectedBlitterSupport, hardwareInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_EQ(expectedBlitterSupport, hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
@ -1047,16 +1051,18 @@ HWTEST_F(HwHelperTest, givenHwHelperWhenAskingForIsaSystemMemoryPlacementThenRet
|
|||||||
EXPECT_NE(localMemoryEnabled, hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
|
EXPECT_NE(localMemoryEnabled, hwHelper.useSystemMemoryPlacementForISA(hardwareInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(HwInfoConfigCommonHelperTest, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenHonorTheFlag) {
|
HWTEST2_F(HwInfoConfigCommonTest, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenHonorTheFlag, IsAtLeastGen12lp) {
|
||||||
DebugManagerStateRestore restore{};
|
DebugManagerStateRestore restore{};
|
||||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||||
|
|
||||||
|
auto hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
||||||
HwInfoConfigCommonHelper::enableBlitterOperationsSupport(hardwareInfo);
|
hwInfoConfig->configureHardwareCustom(&hardwareInfo, nullptr);
|
||||||
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
||||||
HwInfoConfigCommonHelper::enableBlitterOperationsSupport(hardwareInfo);
|
hwInfoConfig->configureHardwareCustom(&hardwareInfo, nullptr);
|
||||||
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,6 +151,19 @@ TEST_F(HwInfoConfigTestLinuxDummy, dummyConfig) {
|
|||||||
GTTYPE GtTypes[] = {
|
GTTYPE GtTypes[] = {
|
||||||
GTTYPE_GT1, GTTYPE_GT2, GTTYPE_GT1_5, GTTYPE_GT2_5, GTTYPE_GT3, GTTYPE_GT4, GTTYPE_GTA, GTTYPE_GTC, GTTYPE_GTX};
|
GTTYPE_GT1, GTTYPE_GT2, GTTYPE_GT1_5, GTTYPE_GT2_5, GTTYPE_GT3, GTTYPE_GT4, GTTYPE_GTA, GTTYPE_GTC, GTTYPE_GTX};
|
||||||
|
|
||||||
|
using HwInfoConfigCommonLinuxTest = ::testing::Test;
|
||||||
|
|
||||||
|
HWTEST2_F(HwInfoConfigCommonLinuxTest, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenIgnore, IsAtMostGen11) {
|
||||||
|
DebugManagerStateRestore restore{};
|
||||||
|
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||||
|
|
||||||
|
auto hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
||||||
|
|
||||||
|
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
||||||
|
hwInfoConfig->configureHardwareCustom(&hardwareInfo, nullptr);
|
||||||
|
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(HwInfoConfigTestLinuxDummy, dummyConfigGtTypes) {
|
TEST_F(HwInfoConfigTestLinuxDummy, dummyConfigGtTypes) {
|
||||||
int ret = hwConfig.configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
int ret = hwConfig.configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
||||||
EXPECT_EQ(0, ret);
|
EXPECT_EQ(0, ret);
|
||||||
|
@ -60,8 +60,6 @@ set(NEO_CORE_HELPERS
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tgllp_plus.inl
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tgllp_plus.inl
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hw_info.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_common_helper.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_common_helper.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/interlocked_max.h
|
${CMAKE_CURRENT_SOURCE_DIR}/interlocked_max.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.h
|
${CMAKE_CURRENT_SOURCE_DIR}/kernel_helpers.h
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2020 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "shared/source/helpers/hw_info_config_common_helper.h"
|
|
||||||
|
|
||||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
|
||||||
#include "shared/source/helpers/hw_info.h"
|
|
||||||
|
|
||||||
namespace NEO {
|
|
||||||
namespace HwInfoConfigCommonHelper {
|
|
||||||
void enableBlitterOperationsSupport(HardwareInfo &hardwareInfo) {
|
|
||||||
hardwareInfo.capabilityTable.blitterOperationsSupported = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily).obtainBlitterPreference(hardwareInfo);
|
|
||||||
|
|
||||||
if (DebugManager.flags.EnableBlitterOperationsSupport.get() != -1) {
|
|
||||||
hardwareInfo.capabilityTable.blitterOperationsSupported = !!DebugManager.flags.EnableBlitterOperationsSupport.get();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // namespace HwInfoConfigCommonHelper
|
|
||||||
} // namespace NEO
|
|
@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2020 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: MIT
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
namespace NEO {
|
|
||||||
struct HardwareInfo;
|
|
||||||
|
|
||||||
namespace HwInfoConfigCommonHelper {
|
|
||||||
void enableBlitterOperationsSupport(HardwareInfo &hardwareInfo);
|
|
||||||
}
|
|
||||||
} // namespace NEO
|
|
@ -54,7 +54,10 @@ class HwInfoConfigHw : public HwInfoConfig {
|
|||||||
bool isEvenContextCountRequired() override;
|
bool isEvenContextCountRequired() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HwInfoConfigHw() {}
|
HwInfoConfigHw() = default;
|
||||||
|
|
||||||
|
void enableRenderCompression(HardwareInfo *hwInfo);
|
||||||
|
void enableBlitterOperationsSupport(HardwareInfo *hwInfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
@ -5,10 +5,25 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||||
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||||
|
enableRenderCompression(hwInfo);
|
||||||
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
uint64_t HwInfoConfigHw<gfxProduct>::getSharedSystemMemCapabilities() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
bool HwInfoConfigHw<gfxProduct>::isEvenContextCountRequired() {
|
bool HwInfoConfigHw<gfxProduct>::isEvenContextCountRequired() {
|
||||||
return false;
|
return false;
|
||||||
@ -17,4 +32,28 @@ bool HwInfoConfigHw<gfxProduct>::isEvenContextCountRequired() {
|
|||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
void HwInfoConfigHw<gfxProduct>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {}
|
void HwInfoConfigHw<gfxProduct>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {}
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
void HwInfoConfigHw<gfxProduct>::enableRenderCompression(HardwareInfo *hwInfo) {
|
||||||
|
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.ftrE2ECompression;
|
||||||
|
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.ftrE2ECompression;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
void HwInfoConfigHw<gfxProduct>::enableBlitterOperationsSupport(HardwareInfo *hwInfo) {
|
||||||
|
hwInfo->capabilityTable.blitterOperationsSupported = HwHelper::get(hwInfo->platform.eRenderCoreFamily).obtainBlitterPreference(*hwInfo);
|
||||||
|
|
||||||
|
if (DebugManager.flags.EnableBlitterOperationsSupport.get() != -1) {
|
||||||
|
hwInfo->capabilityTable.blitterOperationsSupported = !!DebugManager.flags.EnableBlitterOperationsSupport.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
uint64_t HwInfoConfigHw<gfxProduct>::getDeviceMemCapabilities() {
|
||||||
|
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
uint64_t HwInfoConfigHw<gfxProduct>::getSingleDeviceSharedMemCapabilities() {
|
||||||
|
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
||||||
|
}
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
@ -13,24 +13,9 @@ uint64_t HwInfoConfigHw<gfxProduct>::getHostMemCapabilities(const HardwareInfo *
|
|||||||
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
|
||||||
uint64_t HwInfoConfigHw<gfxProduct>::getDeviceMemCapabilities() {
|
|
||||||
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
|
||||||
uint64_t HwInfoConfigHw<gfxProduct>::getSingleDeviceSharedMemCapabilities() {
|
|
||||||
return (UNIFIED_SHARED_MEMORY_ACCESS | UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
uint64_t HwInfoConfigHw<gfxProduct>::getCrossDeviceSharedMemCapabilities() {
|
uint64_t HwInfoConfigHw<gfxProduct>::getCrossDeviceSharedMemCapabilities() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
|
||||||
uint64_t HwInfoConfigHw<gfxProduct>::getSharedSystemMemCapabilities() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
@ -1086,6 +1086,8 @@ using IsGen12LP = IsGfxCore<IGFX_GEN12LP_CORE>;
|
|||||||
|
|
||||||
using IsAtMostGen11 = IsAtMostGfxCore<IGFX_GEN11LP_CORE>;
|
using IsAtMostGen11 = IsAtMostGfxCore<IGFX_GEN11LP_CORE>;
|
||||||
|
|
||||||
|
using IsAtLeastGen12lp = IsAtLeastGfxCore<IGFX_GEN12LP_CORE>;
|
||||||
|
|
||||||
using IsBXT = IsProduct<IGFX_BROXTON>;
|
using IsBXT = IsProduct<IGFX_BROXTON>;
|
||||||
using IsCFL = IsProduct<IGFX_COFFEELAKE>;
|
using IsCFL = IsProduct<IGFX_COFFEELAKE>;
|
||||||
using IsEHL = IsProduct<IGFX_ELKHARTLAKE>;
|
using IsEHL = IsProduct<IGFX_ELKHARTLAKE>;
|
||||||
|
Reference in New Issue
Block a user