mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Move hw_info_config files to shared
Related-To: NEO-5161 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4abe4a96b8
commit
dca33e10ec
@@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/os_interface.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
int HwInfoConfigHw<IGFX_BROXTON>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Drm *drm = osIface->get()->getDrm();
|
||||
FeatureTable *featureTable = &hwInfo->featureTable;
|
||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||
|
||||
gtSystemInfo->SliceCount = 1;
|
||||
|
||||
gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1;
|
||||
gtSystemInfo->VEBoxInfo.IsValid = true;
|
||||
|
||||
int enabled = 0;
|
||||
int retVal = drm->getEnabledPooledEu(enabled);
|
||||
if (retVal == 0) {
|
||||
featureTable->ftrPooledEuEnabled = (enabled != 0);
|
||||
}
|
||||
if (enabled) {
|
||||
int num = 0;
|
||||
retVal = drm->getMinEuInPool(num);
|
||||
if (retVal == 0 && ((num == 3) || (num == 6) || (num == 9))) {
|
||||
gtSystemInfo->EuCountPerPoolMin = static_cast<uint32_t>(num);
|
||||
}
|
||||
//in case of failure or not getting right values, fallback to default
|
||||
else {
|
||||
if (gtSystemInfo->SubSliceCount == 3) {
|
||||
// Native 3x6, PooledEU 2x9
|
||||
gtSystemInfo->EuCountPerPoolMin = 9;
|
||||
} else {
|
||||
// Native 3x6 fused down to 2x6, PooledEU worst case 3+9
|
||||
gtSystemInfo->EuCountPerPoolMin = 3;
|
||||
}
|
||||
}
|
||||
gtSystemInfo->EuCountPerPoolMax = gtSystemInfo->EUCount - gtSystemInfo->EuCountPerPoolMin;
|
||||
}
|
||||
|
||||
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
||||
kmdNotifyProperties.enableKmdNotify = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleep = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true;
|
||||
kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class HwInfoConfigHw<IGFX_BROXTON>;
|
||||
} // namespace NEO
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
int HwInfoConfigHw<IGFX_COFFEELAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||
|
||||
if (gtSystemInfo->SubSliceCount > 3) {
|
||||
gtSystemInfo->SliceCount = 2;
|
||||
} else {
|
||||
gtSystemInfo->SliceCount = 1;
|
||||
}
|
||||
|
||||
gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = true;
|
||||
gtSystemInfo->VEBoxInfo.IsValid = true;
|
||||
|
||||
if (hwInfo->platform.usDeviceID == 0x3EA8 ||
|
||||
hwInfo->platform.usDeviceID == 0x3EA6) {
|
||||
gtSystemInfo->EdramSizeInKb = 64 * 1024;
|
||||
}
|
||||
|
||||
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
||||
kmdNotifyProperties.enableKmdNotify = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleep = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true;
|
||||
kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class HwInfoConfigHw<IGFX_COFFEELAKE>;
|
||||
} // namespace NEO
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/hw_info_config.inl"
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_plus.inl"
|
||||
|
||||
#ifdef SUPPORT_BXT
|
||||
#include "hw_info_config_bxt.inl"
|
||||
#endif
|
||||
#ifdef SUPPORT_CFL
|
||||
#include "hw_info_config_cfl.inl"
|
||||
#endif
|
||||
#ifdef SUPPORT_GLK
|
||||
#include "hw_info_config_glk.inl"
|
||||
#endif
|
||||
#ifdef SUPPORT_KBL
|
||||
#include "hw_info_config_kbl.inl"
|
||||
#endif
|
||||
#ifdef SUPPORT_SKL
|
||||
#include "hw_info_config_skl.inl"
|
||||
#endif
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/os_interface.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
int HwInfoConfigHw<IGFX_GEMINILAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Drm *drm = osIface->get()->getDrm();
|
||||
FeatureTable *featureTable = &hwInfo->featureTable;
|
||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||
|
||||
gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1;
|
||||
gtSystemInfo->VEBoxInfo.IsValid = true;
|
||||
|
||||
int enabled = 0;
|
||||
int retVal = drm->getEnabledPooledEu(enabled);
|
||||
if (retVal == 0) {
|
||||
featureTable->ftrPooledEuEnabled = (enabled != 0);
|
||||
}
|
||||
if (enabled) {
|
||||
int num = 0;
|
||||
retVal = drm->getMinEuInPool(num);
|
||||
if (retVal == 0 && ((num == 3) || (num == 6) || (num == 9))) {
|
||||
gtSystemInfo->EuCountPerPoolMin = static_cast<uint32_t>(num);
|
||||
}
|
||||
//in case of failure or not getting right values, fallback to default
|
||||
else {
|
||||
if (gtSystemInfo->SubSliceCount == 3) {
|
||||
// Native 3x6, PooledEU 2x9
|
||||
gtSystemInfo->EuCountPerPoolMin = 9;
|
||||
} else {
|
||||
// Native 3x6 fused down to 2x6, PooledEU worst case 3+9
|
||||
gtSystemInfo->EuCountPerPoolMin = 3;
|
||||
}
|
||||
}
|
||||
gtSystemInfo->EuCountPerPoolMax = gtSystemInfo->EUCount - gtSystemInfo->EuCountPerPoolMin;
|
||||
}
|
||||
|
||||
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
||||
kmdNotifyProperties.enableKmdNotify = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleep = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true;
|
||||
kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class HwInfoConfigHw<IGFX_GEMINILAKE>;
|
||||
} // namespace NEO
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
int HwInfoConfigHw<IGFX_KABYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||
|
||||
if (gtSystemInfo->SubSliceCount > 3) {
|
||||
gtSystemInfo->SliceCount = 2;
|
||||
} else {
|
||||
gtSystemInfo->SliceCount = 1;
|
||||
}
|
||||
|
||||
gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1;
|
||||
gtSystemInfo->VEBoxInfo.IsValid = true;
|
||||
|
||||
if (hwInfo->platform.usDeviceID == 0x5927 ||
|
||||
hwInfo->platform.usDeviceID == 0x5926) {
|
||||
gtSystemInfo->EdramSizeInKb = 64 * 1024;
|
||||
}
|
||||
|
||||
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
||||
kmdNotifyProperties.enableKmdNotify = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleep = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true;
|
||||
kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class HwInfoConfigHw<IGFX_KABYLAKE>;
|
||||
} // namespace NEO
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include "hw_cmds.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
int HwInfoConfigHw<IGFX_SKYLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||
|
||||
gtSystemInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled = 1;
|
||||
gtSystemInfo->VDBoxInfo.Instances.Bits.VDBox0Enabled = 1;
|
||||
gtSystemInfo->VEBoxInfo.IsValid = true;
|
||||
gtSystemInfo->VDBoxInfo.IsValid = true;
|
||||
|
||||
if (hwInfo->platform.usDeviceID == 0x1926 ||
|
||||
hwInfo->platform.usDeviceID == 0x1927 ||
|
||||
hwInfo->platform.usDeviceID == 0x192D) {
|
||||
gtSystemInfo->EdramSizeInKb = 64 * 1024;
|
||||
}
|
||||
|
||||
if (hwInfo->platform.usDeviceID == 0x193B ||
|
||||
hwInfo->platform.usDeviceID == 0x193D) {
|
||||
gtSystemInfo->EdramSizeInKb = 128 * 1024;
|
||||
}
|
||||
|
||||
auto &kmdNotifyProperties = hwInfo->capabilityTable.kmdNotifyProperties;
|
||||
kmdNotifyProperties.enableKmdNotify = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleep = true;
|
||||
kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits = true;
|
||||
kmdNotifyProperties.delayKmdNotifyMicroseconds = 50000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 5000;
|
||||
kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds = 200000;
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class HwInfoConfigHw<IGFX_SKYLAKE>;
|
||||
} // namespace NEO
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#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_bdw_plus.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
#ifdef SUPPORT_BXT
|
||||
template class HwInfoConfigHw<IGFX_BROXTON>;
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_CFL
|
||||
template class HwInfoConfigHw<IGFX_COFFEELAKE>;
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_GLK
|
||||
template class HwInfoConfigHw<IGFX_GEMINILAKE>;
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_KBL
|
||||
template class HwInfoConfigHw<IGFX_KABYLAKE>;
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_SKL
|
||||
template class HwInfoConfigHw<IGFX_SKYLAKE>;
|
||||
#endif
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user