Move stepping getter functions from HwHelper to HwInfoConfig

Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
This commit is contained in:
Rafal Maziejuk
2021-08-27 13:30:39 +00:00
committed by Compute-Runtime-Automation
parent 13bea69877
commit a651e30aa1
28 changed files with 231 additions and 157 deletions

View File

@@ -24,7 +24,6 @@ enum class LocalMemoryAccessMode;
namespace Gen12LPHelpers {
bool pipeControlWaRequired(PRODUCT_FAMILY productFamily);
uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo);
bool imagePitchAlignmentWaRequired(PRODUCT_FAMILY productFamily);
void adjustCoherencyFlag(PRODUCT_FAMILY productFamily, bool &coherencyFlag);
bool isLocalMemoryEnabled(const HardwareInfo &hwInfo);

View File

@@ -19,18 +19,6 @@ bool pipeControlWaRequired(PRODUCT_FAMILY productFamily) {
return (productFamily == IGFX_TIGERLAKE_LP) || (productFamily == IGFX_DG1);
}
uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) {
if (hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_DG1) {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x1:
return REVISION_B;
}
}
return CommonConstants::invalidStepping;
}
bool imagePitchAlignmentWaRequired(PRODUCT_FAMILY productFamily) {
return (productFamily == IGFX_TIGERLAKE_LP) || (productFamily == IGFX_DG1);
}

View File

@@ -69,38 +69,6 @@ bool HwHelperHw<Family>::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const
return Gen12LPHelpers::isLocalMemoryEnabled(hwInfo);
}
template <>
uint32_t HwHelperHw<Family>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
if (hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_TIGERLAKE_LP) {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x1:
return REVISION_B;
case 0x3:
return REVISION_C;
}
} else if (hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_ROCKETLAKE) {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x1:
return REVISION_B;
case 0x4:
return REVISION_C;
}
} else if ((hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_ALDERLAKE_S) ||
(hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_ALDERLAKE_P)) {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x4:
return REVISION_B;
}
}
return Gen12LPHelpers::getSteppingFromHwRevId(hwInfo);
}
template <>
bool HwHelperHw<Family>::isBufferSizeSuitableForRenderCompression(const size_t size, const HardwareInfo &hwInfo) const {
if (DebugManager.flags.OverrideBufferSuitableForRenderCompression.get() != -1) {

View File

@@ -15,3 +15,14 @@ uint32_t HwInfoConfigHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping, c
}
return CommonConstants::invalidStepping;
}
template <>
uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x4:
return REVISION_B;
}
return CommonConstants::invalidStepping;
}

View File

@@ -15,3 +15,14 @@ uint32_t HwInfoConfigHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping, c
}
return CommonConstants::invalidStepping;
}
template <>
uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x4:
return REVISION_B;
}
return CommonConstants::invalidStepping;
}

View File

@@ -15,3 +15,14 @@ uint32_t HwInfoConfigHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping, c
}
return CommonConstants::invalidStepping;
}
template <>
uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x1:
return REVISION_B;
}
return CommonConstants::invalidStepping;
}

View File

@@ -17,3 +17,16 @@ uint32_t HwInfoConfigHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping, c
}
return CommonConstants::invalidStepping;
}
template <>
uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x1:
return REVISION_B;
case 0x4:
return REVISION_C;
}
return CommonConstants::invalidStepping;
}

View File

@@ -17,3 +17,16 @@ uint32_t HwInfoConfigHw<gfxProduct>::getHwRevIdFromStepping(uint32_t stepping, c
}
return CommonConstants::invalidStepping;
}
template <>
uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &hwInfo) const {
switch (hwInfo.platform.usRevId) {
case 0x0:
return REVISION_A0;
case 0x1:
return REVISION_B;
case 0x3:
return REVISION_C;
}
return CommonConstants::invalidStepping;
}