Files
compute-runtime/shared/source/gen12lp/linux/hw_info_config_adlp.cpp
Rafal Maziejuk c96bd1b35d Move getHwRevIdFromStepping function from HwHelper to HwInfoConfig
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
2021-08-24 15:45:19 +02:00

50 lines
1.6 KiB
C++

/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/gen12lp/helpers_gen12lp.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_bdw_and_later.inl"
namespace NEO {
constexpr static auto gfxProduct = IGFX_ALDERLAKE_P;
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
template <>
void HwInfoConfigHw<IGFX_ALDERLAKE_P>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
PLATFORM *platform = &hwInfo->platform;
platform->eRenderCoreFamily = IGFX_GEN12LP_CORE;
platform->eDisplayCoreFamily = IGFX_GEN12LP_CORE;
}
template <>
int HwInfoConfigHw<IGFX_ALDERLAKE_P>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
gtSystemInfo->SliceCount = 1;
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily);
hwInfo->featureTable.ftrGpGpuMidThreadLevelPreempt = (hwInfo->platform.usRevId >= hwInfoConfig.getHwRevIdFromStepping(REVISION_B, *hwInfo));
enableBlitterOperationsSupport(hwInfo);
return 0;
}
template <>
uint32_t HwInfoConfigHw<IGFX_ALDERLAKE_P>::getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const {
switch (stepping) {
case REVISION_A0:
return 0x0;
case REVISION_B:
return 0x4;
}
return CommonConstants::invalidStepping;
}
template class HwInfoConfigHw<IGFX_ALDERLAKE_P>;
} // namespace NEO