2020-06-16 20:18:59 +08:00
|
|
|
/*
|
2023-01-03 19:46:57 +08:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-06-16 20:18:59 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-02-08 18:14:15 +08:00
|
|
|
#include "shared/source/gen12lp/hw_info_dg1.h"
|
|
|
|
|
2021-03-19 20:43:50 +08:00
|
|
|
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
|
2022-11-25 23:04:24 +08:00
|
|
|
#include "shared/source/command_stream/preemption_mode.h"
|
2020-06-16 20:18:59 +08:00
|
|
|
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
|
|
|
#include "shared/source/helpers/constants.h"
|
|
|
|
|
2022-11-23 17:14:27 +08:00
|
|
|
#include "aubstream/engine_node.h"
|
2020-06-16 20:18:59 +08:00
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
|
|
|
|
const char *HwMapper<IGFX_DG1>::abbreviation = "dg1";
|
|
|
|
|
|
|
|
const PLATFORM DG1::platform = {
|
|
|
|
IGFX_DG1,
|
|
|
|
PCH_UNKNOWN,
|
|
|
|
IGFX_GEN12LP_CORE,
|
|
|
|
IGFX_GEN12LP_CORE,
|
|
|
|
PLATFORM_NONE, // default init
|
|
|
|
0, // usDeviceID
|
|
|
|
0, // usRevId. 0 sets the stepping to A0
|
|
|
|
0, // usDeviceID_PCH
|
|
|
|
0, // usRevId_PCH
|
|
|
|
GTTYPE_UNDEFINED};
|
|
|
|
|
|
|
|
const RuntimeCapabilityTable DG1::capabilityTable{
|
|
|
|
EngineDirectSubmissionInitVec{
|
|
|
|
{aub_stream::ENGINE_RCS, {true, true}},
|
|
|
|
{aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines
|
2021-12-18 02:42:13 +08:00
|
|
|
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
|
2020-06-16 20:18:59 +08:00
|
|
|
MemoryConstants::max64BitAppAddress, // gpuAddressSpace
|
2021-11-17 19:26:26 +08:00
|
|
|
0, // sharedSystemMemCapabilities
|
2020-06-16 20:18:59 +08:00
|
|
|
83.333, // defaultProfilingTimerResolution
|
|
|
|
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
2021-12-18 02:42:13 +08:00
|
|
|
"", // deviceName
|
2020-06-18 20:24:59 +08:00
|
|
|
PreemptionMode::MidThread, // defaultPreemptionMode
|
2020-06-26 21:54:40 +08:00
|
|
|
aub_stream::ENGINE_RCS, // defaultEngineType
|
2020-06-16 20:18:59 +08:00
|
|
|
0, // maxRenderFrequency
|
|
|
|
30, // clVersionSupport
|
|
|
|
CmdServicesMemTraceVersion::DeviceValues::Dg1, // aubDeviceId
|
|
|
|
1, // extraQuantityThreadsPerEU
|
|
|
|
64, // slmSize
|
2020-09-30 14:00:00 +08:00
|
|
|
sizeof(DG1::GRF), // grfSize
|
|
|
|
36u, // timestampValidBits
|
|
|
|
32u, // kernelTimestampValidBits
|
2020-06-16 20:18:59 +08:00
|
|
|
false, // blitterOperationsSupported
|
|
|
|
true, // ftrSupportsInteger64BitAtomics
|
|
|
|
false, // ftrSupportsFP64
|
|
|
|
false, // ftrSupports64BitMath
|
|
|
|
true, // ftrSvm
|
|
|
|
false, // ftrSupportsCoherency
|
|
|
|
false, // ftrSupportsVmeAvcTextureSampler
|
|
|
|
false, // ftrSupportsVmeAvcPreemption
|
|
|
|
false, // ftrRenderCompressedBuffers
|
|
|
|
false, // ftrRenderCompressedImages
|
|
|
|
true, // ftr64KBpages
|
|
|
|
true, // instrumentationEnabled
|
|
|
|
true, // sourceLevelDebuggerSupported
|
|
|
|
false, // supportsVme
|
|
|
|
true, // supportCacheFlushAfterWalker
|
|
|
|
true, // supportsImages,
|
|
|
|
false, // supportsDeviceEnqueue
|
|
|
|
false, // supportsPipes
|
|
|
|
true, // supportsOcl21Features
|
|
|
|
false, // supportsOnDemandPageFaults
|
2020-07-01 00:35:09 +08:00
|
|
|
false, // supportsIndependentForwardProgress
|
2020-06-16 20:18:59 +08:00
|
|
|
false, // hostPtrTrackingEnabled
|
2020-08-11 13:33:58 +08:00
|
|
|
true, // levelZeroSupported
|
2021-05-13 22:58:26 +08:00
|
|
|
false, // isIntegratedDevice
|
2021-06-18 23:23:10 +08:00
|
|
|
true, // supportsMediaBlock
|
2022-02-01 09:46:54 +08:00
|
|
|
true, // p2pAccessSupported
|
|
|
|
false, // p2pAtomicAccessSupported
|
2022-02-19 01:01:54 +08:00
|
|
|
true, // fusedEuEnabled
|
|
|
|
true, // l0DebuggerSupported;
|
2020-06-16 20:18:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
WorkaroundTable DG1::workaroundTable = {};
|
|
|
|
FeatureTable DG1::featureTable = {};
|
|
|
|
|
|
|
|
void DG1::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
|
|
|
FeatureTable *featureTable = &hwInfo->featureTable;
|
|
|
|
WorkaroundTable *workaroundTable = &hwInfo->workaroundTable;
|
|
|
|
|
2021-11-25 17:31:14 +08:00
|
|
|
featureTable->flags.ftrL3IACoherency = true;
|
|
|
|
featureTable->flags.ftrPPGTT = true;
|
|
|
|
featureTable->flags.ftrSVM = true;
|
|
|
|
featureTable->flags.ftrIA32eGfxPTEs = true;
|
|
|
|
featureTable->flags.ftrStandardMipTailFormat = true;
|
|
|
|
featureTable->flags.ftrLocalMemory = true;
|
|
|
|
|
|
|
|
featureTable->flags.ftrTranslationTable = true;
|
|
|
|
featureTable->flags.ftrUserModeTranslationTable = true;
|
|
|
|
featureTable->flags.ftrTileMappedResource = true;
|
|
|
|
|
|
|
|
featureTable->flags.ftrFbc = true;
|
|
|
|
featureTable->flags.ftrTileY = true;
|
|
|
|
|
|
|
|
featureTable->flags.ftrAstcHdr2D = true;
|
|
|
|
featureTable->flags.ftrAstcLdr2D = true;
|
|
|
|
|
|
|
|
featureTable->flags.ftrGpGpuMidBatchPreempt = true;
|
|
|
|
featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true;
|
2020-06-16 20:18:59 +08:00
|
|
|
featureTable->ftrBcsInfo = maxNBitValue(1);
|
|
|
|
|
2021-11-25 17:31:14 +08:00
|
|
|
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
|
2020-06-16 20:18:59 +08:00
|
|
|
};
|
|
|
|
|
2022-05-10 20:52:14 +08:00
|
|
|
void DG1::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
|
|
|
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
|
|
|
gtSysInfo->ThreadCount = gtSysInfo->EUCount * DG1::threadsPerEu;
|
|
|
|
gtSysInfo->TotalVsThreads = 672;
|
|
|
|
gtSysInfo->TotalHsThreads = 672;
|
|
|
|
gtSysInfo->TotalDsThreads = 672;
|
|
|
|
gtSysInfo->TotalGsThreads = 672;
|
|
|
|
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
|
|
|
gtSysInfo->CsrSizeInMb = 8;
|
|
|
|
gtSysInfo->MaxEuPerSubSlice = DG1::maxEuPerSubslice;
|
|
|
|
gtSysInfo->MaxSlicesSupported = DG1::maxSlicesSupported;
|
|
|
|
gtSysInfo->MaxSubSlicesSupported = DG1::maxSubslicesSupported;
|
|
|
|
gtSysInfo->MaxDualSubSlicesSupported = DG1::maxDualSubslicesSupported;
|
|
|
|
gtSysInfo->IsL3HashModeEnabled = false;
|
|
|
|
gtSysInfo->IsDynamicallyPopulated = false;
|
|
|
|
|
|
|
|
if (setupFeatureTableAndWorkaroundTable) {
|
|
|
|
setupFeatureAndWorkaroundTable(hwInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-02 23:10:04 +08:00
|
|
|
const HardwareInfo Dg1HwConfig::hwInfo = {
|
2020-06-16 20:18:59 +08:00
|
|
|
&DG1::platform,
|
|
|
|
&DG1::featureTable,
|
|
|
|
&DG1::workaroundTable,
|
2022-06-02 23:10:04 +08:00
|
|
|
&Dg1HwConfig::gtSystemInfo,
|
2020-06-16 20:18:59 +08:00
|
|
|
DG1::capabilityTable,
|
|
|
|
};
|
2022-05-10 20:52:14 +08:00
|
|
|
|
2022-06-02 23:10:04 +08:00
|
|
|
GT_SYSTEM_INFO Dg1HwConfig::gtSystemInfo = {0};
|
|
|
|
void Dg1HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
2022-05-10 20:52:14 +08:00
|
|
|
DG1::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable);
|
|
|
|
|
2020-06-16 20:18:59 +08:00
|
|
|
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
|
|
|
gtSysInfo->SliceCount = 1;
|
|
|
|
gtSysInfo->DualSubSliceCount = 6;
|
|
|
|
gtSysInfo->L3CacheSizeInKb = 16384;
|
|
|
|
gtSysInfo->L3BankCount = 8;
|
|
|
|
gtSysInfo->MaxFillRate = 16;
|
|
|
|
|
|
|
|
gtSysInfo->CCSInfo.IsValid = true;
|
|
|
|
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
|
|
|
|
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
|
|
|
|
};
|
|
|
|
|
2022-06-02 23:10:04 +08:00
|
|
|
const HardwareInfo DG1::hwInfo = Dg1HwConfig::hwInfo;
|
2021-06-16 01:15:30 +08:00
|
|
|
const uint64_t DG1::defaultHardwareInfoConfig = 0x100060010;
|
2020-06-16 20:18:59 +08:00
|
|
|
|
|
|
|
void setupDG1HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig) {
|
2021-06-16 01:15:30 +08:00
|
|
|
if (hwInfoConfig == 0x100060010) {
|
2022-06-02 23:10:04 +08:00
|
|
|
Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
|
2020-06-16 20:18:59 +08:00
|
|
|
} else if (hwInfoConfig == 0x0) {
|
|
|
|
// Default config
|
2022-06-02 23:10:04 +08:00
|
|
|
Dg1HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
|
2020-06-16 20:18:59 +08:00
|
|
|
} else {
|
|
|
|
UNRECOVERABLE_IF(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void (*DG1::setupHardwareInfo)(HardwareInfo *, bool, const uint64_t) = setupDG1HardwareInfoImpl;
|
|
|
|
} // namespace NEO
|