From 518595dd97989846afb672c2ae834b0f8957ab11 Mon Sep 17 00:00:00 2001 From: Katarzyna Cencelewska Date: Fri, 6 May 2022 15:50:26 +0000 Subject: [PATCH] Add adjustHardwareInfo method on dg2 Signed-off-by: Katarzyna Cencelewska --- shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl | 4 +++- shared/source/xe_hpg_core/hw_cmds_dg2.h | 1 + shared/source/xe_hpg_core/hw_info_dg2.cpp | 1 + shared/source/xe_hpg_core/linux/hw_info_config_dg2.cpp | 3 ++- shared/source/xe_hpg_core/windows/hw_info_config_dg2.cpp | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl b/shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl index 5d3171b913..31fb17e688 100644 --- a/shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl +++ b/shared/source/xe_hpg_core/definitions/hw_info_setup_dg2.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,8 @@ const HardwareInfo DG2::hwInfo = DG2_CONFIG::hwInfo; const uint64_t DG2::defaultHardwareInfoConfig = 0; +void DG2::adjustHardwareInfo(HardwareInfo *hwInfo) {} + void setupDG2HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) { if (hwInfoConfig == 0x0) { // Default config diff --git a/shared/source/xe_hpg_core/hw_cmds_dg2.h b/shared/source/xe_hpg_core/hw_cmds_dg2.h index eb85011134..f4511737eb 100644 --- a/shared/source/xe_hpg_core/hw_cmds_dg2.h +++ b/shared/source/xe_hpg_core/hw_cmds_dg2.h @@ -27,6 +27,7 @@ struct DG2 : public XE_HPG_COREFamily { static const RuntimeCapabilityTable capabilityTable; static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); + static void adjustHardwareInfo(HardwareInfo *hwInfo); static bool isG10(const HardwareInfo &hwInfo) { auto it = std::find(DG2_G10_IDS.begin(), DG2_G10_IDS.end(), hwInfo.platform.usDeviceID); diff --git a/shared/source/xe_hpg_core/hw_info_dg2.cpp b/shared/source/xe_hpg_core/hw_info_dg2.cpp index 394bda9bce..7b544f06d4 100644 --- a/shared/source/xe_hpg_core/hw_info_dg2.cpp +++ b/shared/source/xe_hpg_core/hw_info_dg2.cpp @@ -170,6 +170,7 @@ void DG2_CONFIG::setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool setupFeat } } + adjustHardwareInfo(hwInfo); if (setupFeatureTableAndWorkaroundTable) { DG2::setupFeatureAndWorkaroundTable(hwInfo); } diff --git a/shared/source/xe_hpg_core/linux/hw_info_config_dg2.cpp b/shared/source/xe_hpg_core/linux/hw_info_config_dg2.cpp index 1d9ea613e1..15c1d6ddd5 100644 --- a/shared/source/xe_hpg_core/linux/hw_info_config_dg2.cpp +++ b/shared/source/xe_hpg_core/linux/hw_info_config_dg2.cpp @@ -29,6 +29,7 @@ int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OS enableCompression(hwInfo); } + DG2::adjustHardwareInfo(hwInfo); enableBlitterOperationsSupport(hwInfo); auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties; @@ -41,4 +42,4 @@ int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OS } template class HwInfoConfigHw; -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/xe_hpg_core/windows/hw_info_config_dg2.cpp b/shared/source/xe_hpg_core/windows/hw_info_config_dg2.cpp index 8304182214..738c56d4ed 100644 --- a/shared/source/xe_hpg_core/windows/hw_info_config_dg2.cpp +++ b/shared/source/xe_hpg_core/windows/hw_info_config_dg2.cpp @@ -27,7 +27,7 @@ int HwInfoConfigHw::configureHardwareCustom(HardwareInfo *hwInfo, OS if (allowCompression(*hwInfo)) { enableCompression(hwInfo); } - + DG2::adjustHardwareInfo(hwInfo); enableBlitterOperationsSupport(hwInfo); return 0;