mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Don't use global product helper in isWorkaroundRequired function
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bcf0ff0c00
commit
7dd96449ff
@@ -8,7 +8,9 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -80,4 +82,13 @@ uint32_t GfxCoreHelper::getHighestEnabledSlice(const HardwareInfo &hwInfo) {
|
||||
return highestEnabledSlice;
|
||||
}
|
||||
|
||||
bool GfxCoreHelper::isWorkaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo, const ProductHelper &productHelper) {
|
||||
auto lowestHwRevIdWithBug = productHelper.getHwRevIdFromStepping(lowestSteppingWithBug, hwInfo);
|
||||
auto hwRevIdWithFix = productHelper.getHwRevIdFromStepping(steppingWithFix, hwInfo);
|
||||
if ((lowestHwRevIdWithBug == CommonConstants::invalidStepping) || (hwRevIdWithFix == CommonConstants::invalidStepping)) {
|
||||
return false;
|
||||
}
|
||||
return (lowestHwRevIdWithBug <= hwInfo.platform.usRevId && hwInfo.platform.usRevId < hwRevIdWithFix);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -163,6 +163,7 @@ class GfxCoreHelper {
|
||||
virtual bool isChipsetUniqueUUIDSupported() const = 0;
|
||||
virtual bool isTimestampShiftRequired() const = 0;
|
||||
virtual bool isRelaxedOrderingSupported() const = 0;
|
||||
static bool isWorkaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo, const ProductHelper &productHelper);
|
||||
|
||||
protected:
|
||||
GfxCoreHelper() = default;
|
||||
@@ -358,7 +359,6 @@ class GfxCoreHelperHw : public GfxCoreHelper {
|
||||
void setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize) const override;
|
||||
|
||||
void adjustPreemptionSurfaceSize(size_t &csrSize) const override;
|
||||
static bool isWorkaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo, const ProductHelper &productHelper);
|
||||
bool isScratchSpaceSurfaceStateAccessible() const override;
|
||||
uint32_t getMaxScratchSize() const override;
|
||||
bool preferInternalBcsEngine() const override;
|
||||
|
||||
@@ -665,16 +665,6 @@ template <typename GfxFamily>
|
||||
void GfxCoreHelperHw<GfxFamily>::adjustPreemptionSurfaceSize(size_t &csrSize) const {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool GfxCoreHelperHw<GfxFamily>::isWorkaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo, const ProductHelper &productHelper) {
|
||||
auto lowestHwRevIdWithBug = productHelper.getHwRevIdFromStepping(lowestSteppingWithBug, hwInfo);
|
||||
auto hwRevIdWithFix = productHelper.getHwRevIdFromStepping(steppingWithFix, hwInfo);
|
||||
if ((lowestHwRevIdWithBug == CommonConstants::invalidStepping) || (hwRevIdWithFix == CommonConstants::invalidStepping)) {
|
||||
return false;
|
||||
}
|
||||
return (lowestHwRevIdWithBug <= hwInfo.platform.usRevId && hwInfo.platform.usRevId < hwRevIdWithFix);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void GfxCoreHelperHw<GfxFamily>::encodeBufferSurfaceState(EncodeSurfaceStateArgs &args) const {
|
||||
EncodeSurfaceState<GfxFamily>::encodeBuffer(args);
|
||||
|
||||
Reference in New Issue
Block a user