Move HwInfoConfig ownership to RootDeviceEnvironment 1/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>

- Added HwInfoConfig getter in RootDeviceEnvironment,
which temporarily takes HwInfoConfig from the global array
- use HwInfoConfig from RootDeviceEnvironment to
call ConfigureHardwareCustom function
- Added getHwInfoConfig in DeviceFixture
- ConfigureHardwareCustom function and few others changed to const
- Small code cleanup
This commit is contained in:
Kamil Kopryk
2022-11-07 14:47:17 +00:00
committed by Compute-Runtime-Automation
parent 68300a9605
commit eafea5e2fe
50 changed files with 177 additions and 153 deletions

View File

@@ -17,7 +17,7 @@ struct MockHwInfoConfigHw : NEO::HwInfoConfigHw<productFamily> {
bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const override;
bool getUuid(Device *device, std::array<uint8_t, HwInfoConfig::uuidSize> &uuid) const override;
uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const override;
int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) override;
int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const override;
uint64_t getDeviceMemoryPhysicalSizeInBytes(const OSInterface *osIface, uint32_t subDeviceIndex) override;
uint32_t getDeviceMemoryMaxClkRate(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) override;
uint32_t getL1CachePolicy(bool isDebuggerActive) const override;

View File

@@ -25,7 +25,7 @@ uint32_t MockHwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareIn
}
template <>
int MockHwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
int MockHwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
FeatureTable *featureTable = &hwInfo->featureTable;
featureTable->flags.ftrGpGpuMidThreadLevelPreempt = 0;
featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = 0;