2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2025-01-03 10:16:25 +00:00
|
|
|
* Copyright (C) 2018-2025 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/direct_submission/direct_submission_properties.h"
|
2022-12-06 15:59:36 +00:00
|
|
|
#include "shared/source/helpers/hw_ip_version.h"
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/helpers/kmd_notify_properties.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
#include "gtsysinfo.h"
|
2025-05-30 12:56:08 +00:00
|
|
|
#include "neo_igfxfmid.h"
|
2018-01-09 14:08:34 +01:00
|
|
|
#include "sku_info.h"
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2023-09-12 09:23:51 +00:00
|
|
|
|
2022-11-25 15:04:24 +00:00
|
|
|
enum PreemptionMode : uint32_t;
|
2023-11-16 14:24:12 +00:00
|
|
|
class ReleaseHelper;
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
struct RuntimeCapabilityTable {
|
2020-01-15 17:02:47 +01:00
|
|
|
DirectSubmissionProperyEngines directSubmissionEngines;
|
2018-12-06 15:33:02 +01:00
|
|
|
KmdNotifyProperties kmdNotifyProperties;
|
|
|
|
|
uint64_t gpuAddressSpace;
|
2021-11-17 11:26:26 +00:00
|
|
|
uint64_t sharedSystemMemCapabilities;
|
2018-12-06 15:33:02 +01:00
|
|
|
size_t requiredPreemptionSurfaceSize;
|
2021-12-17 18:42:13 +00:00
|
|
|
const char *deviceName;
|
2023-09-12 09:23:51 +00:00
|
|
|
const char *preferredPlatformName;
|
2018-12-06 15:33:02 +01:00
|
|
|
PreemptionMode defaultPreemptionMode;
|
2019-03-27 10:06:29 +01:00
|
|
|
aub_stream::EngineType defaultEngineType;
|
2018-12-06 15:33:02 +01:00
|
|
|
uint32_t maxRenderFrequency;
|
2017-12-21 00:45:38 +01:00
|
|
|
unsigned int clVersionSupport;
|
2018-12-06 15:33:02 +01:00
|
|
|
uint32_t aubDeviceId;
|
|
|
|
|
uint32_t extraQuantityThreadsPerEU;
|
2025-04-14 17:38:10 +00:00
|
|
|
uint32_t maxProgrammableSlmSize;
|
2019-12-17 08:55:09 +01:00
|
|
|
uint32_t grfSize;
|
2020-09-29 23:00:00 -07:00
|
|
|
uint32_t timestampValidBits;
|
|
|
|
|
uint32_t kernelTimestampValidBits;
|
2019-04-16 09:06:37 +02:00
|
|
|
bool blitterOperationsSupported;
|
2019-08-20 15:17:10 +02:00
|
|
|
bool ftrSupportsInteger64BitAtomics;
|
2017-12-21 00:45:38 +01:00
|
|
|
bool ftrSupportsFP64;
|
2023-02-27 16:53:08 +00:00
|
|
|
bool ftrSupportsFP64Emulation;
|
2017-12-21 00:45:38 +01:00
|
|
|
bool ftrSupports64BitMath;
|
|
|
|
|
bool ftrSupportsCoherency;
|
2018-07-18 14:11:05 +02:00
|
|
|
bool ftrRenderCompressedBuffers;
|
|
|
|
|
bool ftrRenderCompressedImages;
|
2018-12-06 15:33:02 +01:00
|
|
|
bool ftr64KBpages;
|
2017-12-21 00:45:38 +01:00
|
|
|
bool instrumentationEnabled;
|
2018-12-06 15:33:02 +01:00
|
|
|
bool supportCacheFlushAfterWalker;
|
2019-07-01 11:29:15 +02:00
|
|
|
bool supportsImages;
|
2020-04-30 15:47:43 +02:00
|
|
|
bool supportsOcl21Features;
|
2020-06-05 01:32:00 -07:00
|
|
|
bool supportsOnDemandPageFaults;
|
2020-06-18 15:07:58 +02:00
|
|
|
bool supportsIndependentForwardProgress;
|
2020-08-10 22:33:58 -07:00
|
|
|
bool isIntegratedDevice;
|
2021-05-13 14:58:26 +00:00
|
|
|
bool supportsMediaBlock;
|
2022-02-01 01:46:54 +00:00
|
|
|
bool p2pAccessSupported;
|
|
|
|
|
bool p2pAtomicAccessSupported;
|
2021-06-18 15:23:10 +00:00
|
|
|
bool fusedEuEnabled;
|
2022-02-18 17:01:54 +00:00
|
|
|
bool l0DebuggerSupported;
|
2023-02-17 19:00:29 +00:00
|
|
|
bool supportsFloatAtomics;
|
2024-05-24 01:12:14 +00:00
|
|
|
uint32_t cxlType;
|
2021-10-22 12:01:47 +02:00
|
|
|
|
2025-06-03 11:06:43 +00:00
|
|
|
bool operator==(const RuntimeCapabilityTable &) const = default;
|
|
|
|
|
};
|
2021-10-22 12:01:47 +02:00
|
|
|
|
2023-12-13 11:13:33 +00:00
|
|
|
struct HardwareInfo { // NOLINT(clang-analyzer-optin.performance.Padding)
|
2018-06-12 09:42:47 +02:00
|
|
|
HardwareInfo() = default;
|
2019-05-08 16:00:24 +02:00
|
|
|
HardwareInfo(const PLATFORM *platform, const FeatureTable *featureTable, const WorkaroundTable *workaroundTable,
|
2023-07-31 12:48:31 +00:00
|
|
|
const GT_SYSTEM_INFO *gtSystemInfo, const RuntimeCapabilityTable &capabilityTable);
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-10-31 13:57:24 +00:00
|
|
|
PLATFORM platform{};
|
|
|
|
|
FeatureTable featureTable{};
|
|
|
|
|
WorkaroundTable workaroundTable{};
|
|
|
|
|
alignas(4) GT_SYSTEM_INFO gtSystemInfo{};
|
|
|
|
|
alignas(8) RuntimeCapabilityTable capabilityTable{};
|
2022-11-04 09:25:49 +00:00
|
|
|
alignas(8) HardwareIpVersion ipVersion{};
|
2025-01-20 17:38:50 +00:00
|
|
|
alignas(8) HardwareIpVersion ipVersionOverrideExposedToTheApplication{};
|
2017-12-21 00:45:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Global table of hardware prefixes
|
|
|
|
|
extern bool familyEnabled[IGFX_MAX_CORE];
|
2019-10-18 10:15:09 +02:00
|
|
|
extern const char *hardwarePrefix[IGFX_MAX_PRODUCT];
|
2017-12-21 00:45:38 +01:00
|
|
|
extern const HardwareInfo *hardwareInfoTable[IGFX_MAX_PRODUCT];
|
2023-11-16 14:24:12 +00:00
|
|
|
extern void (*hardwareInfoSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
|
|
|
|
|
extern void (*hardwareInfoBaseSetup[IGFX_MAX_PRODUCT])(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper);
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
template <GFXCORE_FAMILY gfxFamily>
|
|
|
|
|
struct EnableGfxFamilyHw {
|
|
|
|
|
EnableGfxFamilyHw() {
|
|
|
|
|
familyEnabled[gfxFamily] = true;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2019-07-18 11:58:30 +02:00
|
|
|
bool getHwInfoForPlatformString(std::string &platform, const HardwareInfo *&hwInfoIn);
|
2020-01-24 17:19:06 +01:00
|
|
|
void setHwInfoValuesFromConfig(const uint64_t hwInfoConfig, HardwareInfo &hwInfoIn);
|
|
|
|
|
bool parseHwInfoConfigString(const std::string &hwInfoConfigStr, uint64_t &hwInfoConfig);
|
2019-03-27 10:06:29 +01:00
|
|
|
aub_stream::EngineType getChosenEngineType(const HardwareInfo &hwInfo);
|
2024-06-25 09:37:08 +00:00
|
|
|
void setupDefaultGtSysInfo(HardwareInfo *hwInfo, const ReleaseHelper *releaseHelper);
|
2024-12-23 09:39:18 +00:00
|
|
|
void setupDefaultFeatureTableAndWorkaroundTable(HardwareInfo *hwInfo, const ReleaseHelper &releaseHelper);
|
2024-11-19 18:18:28 +00:00
|
|
|
uint32_t getNumSubSlicesPerSlice(const HardwareInfo &hwInfo);
|
2019-11-28 15:39:30 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|