mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: Add dc flush mitigation infrastructure
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a1bd375237
commit
f2d56744e3
@@ -131,6 +131,7 @@ class ProductHelper {
|
||||
virtual bool isTile64With3DSurfaceOnBCSSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isDcFlushAllowed() const = 0;
|
||||
virtual bool isDcFlushMitigated() const = 0;
|
||||
virtual bool mitigateDcFlush() const = 0;
|
||||
virtual bool overridePatAndUsageForDcFlushMitigation(AllocationType allocationType) const = 0;
|
||||
virtual bool overrideCacheableForDcFlushMitigation(AllocationType allocationType) const = 0;
|
||||
virtual uint32_t computeMaxNeededSubSliceSpace(const HardwareInfo &hwInfo) const = 0;
|
||||
|
||||
@@ -394,7 +394,7 @@ bool ProductHelperHw<gfxProduct>::isDisableScratchPagesSupported() const {
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::isDcFlushAllowed() const {
|
||||
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
|
||||
bool dcFlushAllowed = GfxProduct::isDcFlushAllowed;
|
||||
bool dcFlushAllowed = GfxProduct::isDcFlushAllowed && !this->mitigateDcFlush();
|
||||
|
||||
if (debugManager.flags.AllowDcFlush.get() != -1) {
|
||||
dcFlushAllowed = debugManager.flags.AllowDcFlush.get();
|
||||
@@ -403,6 +403,11 @@ bool ProductHelperHw<gfxProduct>::isDcFlushAllowed() const {
|
||||
return dcFlushAllowed;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::mitigateDcFlush() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::isDcFlushMitigated() const {
|
||||
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
|
||||
|
||||
@@ -76,6 +76,7 @@ class ProductHelperHw : public ProductHelper {
|
||||
bool isTile64With3DSurfaceOnBCSSupported(const HardwareInfo &hwInfo) const override;
|
||||
bool isDcFlushAllowed() const override;
|
||||
bool isDcFlushMitigated() const override;
|
||||
bool mitigateDcFlush() const override;
|
||||
bool overridePatAndUsageForDcFlushMitigation(AllocationType allocationType) const override;
|
||||
bool overrideCacheableForDcFlushMitigation(AllocationType allocationType) const override;
|
||||
uint32_t computeMaxNeededSubSliceSpace(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
Reference in New Issue
Block a user