diff --git a/shared/source/os_interface/product_helper.h b/shared/source/os_interface/product_helper.h index 102c8010a9..c1c69858fa 100644 --- a/shared/source/os_interface/product_helper.h +++ b/shared/source/os_interface/product_helper.h @@ -230,6 +230,7 @@ class ProductHelper { virtual std::optional getPreferredAllocationMethod(AllocationType allocationType) const = 0; virtual bool isCachingOnCpuAvailable() const = 0; virtual bool isNewCoherencyModelSupported() const = 0; + virtual bool deferMOCSToPatIndex() const = 0; virtual const std::vector getSupportedLocalDispatchSizes(const HardwareInfo &hwInfo) const = 0; virtual bool supportReadOnlyAllocations() const = 0; virtual bool isDeviceToHostCopySignalingFenceRequired() const = 0; diff --git a/shared/source/os_interface/product_helper_bdw_and_later.inl b/shared/source/os_interface/product_helper_bdw_and_later.inl index 3bc31053bd..3aff2f78ef 100644 --- a/shared/source/os_interface/product_helper_bdw_and_later.inl +++ b/shared/source/os_interface/product_helper_bdw_and_later.inl @@ -45,6 +45,11 @@ bool ProductHelperHw::isNewResidencyModelSupported() const { return false; } +template +bool ProductHelperHw::deferMOCSToPatIndex() const { + return false; +} + template bool ProductHelperHw::heapInLocalMem(const HardwareInfo &hwInfo) const { return false; diff --git a/shared/source/os_interface/product_helper_hw.h b/shared/source/os_interface/product_helper_hw.h index afd33de85c..407390cb81 100644 --- a/shared/source/os_interface/product_helper_hw.h +++ b/shared/source/os_interface/product_helper_hw.h @@ -175,6 +175,7 @@ class ProductHelperHw : public ProductHelper { std::optional getPreferredAllocationMethod(AllocationType allocationType) const override; bool isCachingOnCpuAvailable() const override; bool isNewCoherencyModelSupported() const override; + bool deferMOCSToPatIndex() const override; bool supportReadOnlyAllocations() const override; const std::vector getSupportedLocalDispatchSizes(const HardwareInfo &hwInfo) const override; bool isDeviceToHostCopySignalingFenceRequired() const override; diff --git a/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl b/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl index 4c68b097b6..c0fb3edcb8 100644 --- a/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl +++ b/shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl @@ -59,6 +59,11 @@ bool ProductHelperHw::isNewResidencyModelSupported() const { return true; } +template +bool ProductHelperHw::deferMOCSToPatIndex() const { + return false; +} + template void ProductHelperHw::setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) { coherencyFlag = false; diff --git a/shared/source/os_interface/windows/gmm_helper_win.cpp b/shared/source/os_interface/windows/gmm_helper_win.cpp index e5c473724f..4557cdef17 100644 --- a/shared/source/os_interface/windows/gmm_helper_win.cpp +++ b/shared/source/os_interface/windows/gmm_helper_win.cpp @@ -11,6 +11,6 @@ namespace NEO { bool GmmHelper::deferMOCSToPatIndex() const { - return this->rootDeviceEnvironment.getProductHelper().isNewCoherencyModelSupported(); + return this->rootDeviceEnvironment.getProductHelper().deferMOCSToPatIndex(); } } // namespace NEO \ No newline at end of file diff --git a/shared/test/common/mocks/mock_product_helper.cpp b/shared/test/common/mocks/mock_product_helper.cpp index 33850756df..8630add1dd 100644 --- a/shared/test/common/mocks/mock_product_helper.cpp +++ b/shared/test/common/mocks/mock_product_helper.cpp @@ -197,6 +197,11 @@ bool ProductHelperHw::isNewResidencyModelSupported() const { return false; } +template <> +bool ProductHelperHw::deferMOCSToPatIndex() const { + return false; +} + template <> std::pair ProductHelperHw::isPipeControlPriorToNonPipelinedStateCommandsWARequired(const HardwareInfo &hwInfo, bool isRcs, const ReleaseHelper *releaseHelper) const { return {false, false}; diff --git a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp index f9638294f0..f9656ddc21 100644 --- a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp +++ b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp @@ -359,6 +359,11 @@ HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCallIsNewCoherencyModel EXPECT_TRUE(productHelper->isNewCoherencyModelSupported()); } +HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCallDeferMOCSToPatThenFalseIsReturned, IsXeLpg) { + const auto &productHelper = getHelper(); + EXPECT_FALSE(productHelper.deferMOCSToPatIndex()); +} + HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnTrue, IsXeLpg) { EXPECT_TRUE(productHelper->isDummyBlitWaRequired()); }