2018-04-04 18:38:36 +02:00
|
|
|
/*
|
2021-05-16 20:51:16 +02:00
|
|
|
* Copyright (C) 2020-2021 Intel Corporation
|
2018-04-04 18:38:36 +02:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-04-04 18:38:36 +02:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-11-21 15:50:18 +00:00
|
|
|
#include "shared/source/debug_settings/debug_settings_manager.h"
|
|
|
|
|
#include "shared/source/helpers/hw_helper.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/os_interface/hw_info_config.h"
|
2018-04-04 18:38:36 +02:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2018-04-04 18:38:36 +02:00
|
|
|
|
2020-11-21 15:50:18 +00:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
|
|
|
|
enableRenderCompression(hwInfo);
|
|
|
|
|
enableBlitterOperationsSupport(hwInfo);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-26 09:57:36 +00:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
void HwInfoConfigHw<gfxProduct>::getKernelExtendedProperties(uint32_t *fp16, uint32_t *fp32, uint32_t *fp64) {
|
|
|
|
|
*fp16 = 0u;
|
|
|
|
|
*fp32 = 0u;
|
|
|
|
|
*fp64 = 0u;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-21 15:50:18 +00:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
uint64_t HwInfoConfigHw<gfxProduct>::getSharedSystemMemCapabilities() {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-20 10:45:15 +01:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
2021-01-26 14:31:39 +00:00
|
|
|
void HwInfoConfigHw<gfxProduct>::convertTimestampsFromOaToCsDomain(uint64_t ×tampData){};
|
|
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
2020-11-20 10:45:15 +01:00
|
|
|
void HwInfoConfigHw<gfxProduct>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {}
|
|
|
|
|
|
2021-02-05 01:58:42 +00:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
2021-04-06 12:35:03 +00:00
|
|
|
void HwInfoConfigHw<gfxProduct>::adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) {}
|
2021-02-05 01:58:42 +00:00
|
|
|
|
2020-11-21 15:50:18 +00:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
void HwInfoConfigHw<gfxProduct>::enableBlitterOperationsSupport(HardwareInfo *hwInfo) {
|
2021-08-17 12:00:35 +00:00
|
|
|
hwInfo->capabilityTable.blitterOperationsSupported = obtainBlitterPreference(*hwInfo);
|
2020-11-21 15:50:18 +00:00
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
2020-11-26 08:31:10 +00:00
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
bool HwInfoConfigHw<gfxProduct>::getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
uint64_t HwInfoConfigHw<gfxProduct>::getHostMemCapabilities(const HardwareInfo *hwInfo) {
|
|
|
|
|
bool supported = getHostMemCapabilitiesSupported(hwInfo);
|
|
|
|
|
|
|
|
|
|
if (DebugManager.flags.EnableHostUsmSupport.get() != -1) {
|
|
|
|
|
supported = !!DebugManager.flags.EnableHostUsmSupport.get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (supported ? getHostMemCapabilitiesValue() : 0);
|
|
|
|
|
}
|
2021-04-19 11:31:20 +00:00
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
uint32_t HwInfoConfigHw<gfxProduct>::getDeviceMemoryMaxClkRate(const HardwareInfo *hwInfo) {
|
|
|
|
|
return 0u;
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-23 13:34:56 +00:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
bool HwInfoConfigHw<gfxProduct>::isAdditionalStateBaseAddressWARequired(const HardwareInfo &hwInfo) const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-06 10:14:23 +00:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
bool HwInfoConfigHw<gfxProduct>::isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
uint32_t HwInfoConfigHw<gfxProduct>::getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const {
|
|
|
|
|
uint32_t numThreadsPerEU = hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount;
|
|
|
|
|
return maxNumEUsPerSubSlice * numThreadsPerEU;
|
|
|
|
|
}
|
2021-07-06 13:29:10 +00:00
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
void HwInfoConfigHw<gfxProduct>::setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) {}
|
2021-08-19 11:06:49 +00:00
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
bool HwInfoConfigHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2021-08-20 15:41:43 +00:00
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
uint32_t HwInfoConfigHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const {
|
|
|
|
|
return CommonConstants::invalidStepping;
|
|
|
|
|
}
|
2021-08-27 13:30:39 +00:00
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
|
|
|
|
return CommonConstants::invalidStepping;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
uint32_t HwInfoConfigHw<gfxProduct>::getAubStreamSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
|
|
|
|
|
switch (getSteppingFromHwRevId(hwInfo)) {
|
|
|
|
|
default:
|
|
|
|
|
case REVISION_A0:
|
|
|
|
|
case REVISION_A1:
|
|
|
|
|
case REVISION_A3:
|
|
|
|
|
return AubMemDump::SteppingValues::A;
|
|
|
|
|
case REVISION_B:
|
|
|
|
|
return AubMemDump::SteppingValues::B;
|
|
|
|
|
case REVISION_C:
|
|
|
|
|
return AubMemDump::SteppingValues::C;
|
|
|
|
|
case REVISION_D:
|
|
|
|
|
return AubMemDump::SteppingValues::D;
|
|
|
|
|
case REVISION_K:
|
|
|
|
|
return AubMemDump::SteppingValues::K;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-09-02 11:11:39 +00:00
|
|
|
|
2021-08-31 15:48:56 +00:00
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
void HwInfoConfigHw<gfxProduct>::setAdditionalPipelineSelectFields(void *pipelineSelectCmd, const PipelineSelectArgs &pipelineSelectArgs, const HardwareInfo &hwInfo) {}
|
2021-09-02 11:11:39 +00:00
|
|
|
|
|
|
|
|
template <PRODUCT_FAMILY gfxProduct>
|
|
|
|
|
bool HwInfoConfigHw<gfxProduct>::isDefaultEngineTypeAdjustmentRequired(const HardwareInfo &hwInfo) const {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|