mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 09:30:36 +08:00
Move isPageTableManagerSupported function from HwHelper to HwInfoConfig
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com> Related-To: NEO-4541
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
78fa40fac0
commit
c6ee7065db
@@ -24,6 +24,7 @@
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/memory_manager/surface.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/utilities/cpuintrinsics.h"
|
||||
@@ -665,7 +666,7 @@ bool CommandStreamReceiver::needsPageTableManager(aub_stream::EngineType engineT
|
||||
if (rootDeviceEnvironment->pageTableManager.get() != nullptr) {
|
||||
return false;
|
||||
}
|
||||
return HwHelper::get(hwInfo->platform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo);
|
||||
return HwInfoConfig::get(hwInfo->platform.eProductFamily)->isPageTableManagerSupported(*hwInfo);
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::printDeviceIndex() {
|
||||
|
||||
@@ -69,11 +69,6 @@ bool HwHelperHw<Family>::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const
|
||||
return Gen12LPHelpers::isLocalMemoryEnabled(hwInfo);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return hwInfo.capabilityTable.ftrRenderCompressedBuffers || hwInfo.capabilityTable.ftrRenderCompressedImages;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t HwHelperHw<Family>::getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const {
|
||||
if (hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_TIGERLAKE_LP) {
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
#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) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_S;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ALDERLAKE_S>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_DG1;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_DG1>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ROCKETLAKE;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ROCKETLAKE>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_TIGERLAKE_LP>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
||||
11
shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl
Normal file
11
shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return hwInfo.capabilityTable.ftrRenderCompressedBuffers || hwInfo.capabilityTable.ftrRenderCompressedImages;
|
||||
}
|
||||
@@ -11,6 +11,9 @@
|
||||
#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) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_S;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ALDERLAKE_S>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_DG1;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_DG1>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ROCKETLAKE;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ROCKETLAKE>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_TIGERLAKE_LP>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
||||
@@ -60,7 +60,6 @@ class HwHelper {
|
||||
virtual bool isL3Configurable(const HardwareInfo &hwInfo) = 0;
|
||||
virtual SipKernelType getSipKernelType(bool debuggingActive) const = 0;
|
||||
virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const = 0;
|
||||
virtual bool isFenceAllocationRequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual const AubMemDump::LrcaHelper &getCsTraits(aub_stream::EngineType engineType) const = 0;
|
||||
@@ -238,8 +237,6 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
bool timestampPacketWriteSupported() const override;
|
||||
|
||||
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const override;
|
||||
|
||||
bool isFenceAllocationRequired(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
@@ -81,11 +81,6 @@ const AubMemDump::LrcaHelper &HwHelperHw<Family>::getCsTraits(aub_stream::Engine
|
||||
return *AUBFamilyMapper<Family>::csTraits[engineType];
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool HwHelperHw<Family>::isFenceAllocationRequired(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
|
||||
@@ -45,6 +45,7 @@ class HwInfoConfig {
|
||||
virtual uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const = 0;
|
||||
virtual void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) = 0;
|
||||
virtual bool obtainBlitterPreference(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
|
||||
uint32_t threadsPerEu;
|
||||
};
|
||||
@@ -73,6 +74,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
||||
uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override;
|
||||
void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) override;
|
||||
bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override;
|
||||
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
protected:
|
||||
HwInfoConfigHw() = default;
|
||||
|
||||
@@ -98,4 +98,9 @@ uint32_t HwInfoConfigHw<gfxProduct>::getMaxThreadsForWorkgroup(const HardwareInf
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void HwInfoConfigHw<gfxProduct>::setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) {}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -47,11 +47,6 @@ inline bool HwHelperHw<Family>::isSpecialWorkgroupSizeRequired(const HardwareInf
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isNewResidencyModelSupported() const {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user