From cbcc6804df912ec5c0a7d4d4de5eb638b6a9b3c3 Mon Sep 17 00:00:00 2001 From: Yang_Jiafeng Date: Mon, 14 Oct 2024 13:43:47 +0800 Subject: [PATCH] [VP] ZBB_LACE_FDFB ZBB Lace and FDFB --- .../vp_platform_interface_xe_hpm.cpp | 7 ++++ .../vp_platform_interface_xe_hpm.h | 2 ++ .../vp_platform_interface_xe2_lpm.cpp | 7 ++++ .../vp_platform_interface_xe2_lpm.h | 2 ++ .../vp_platform_interface_xe2_hpm.cpp | 7 ++++ .../vp_platform_interface_xe2_hpm.h | 2 ++ .../vp_platform_interface_xe_lpm_plus.cpp | 7 ++++ .../vp_platform_interface_xe_lpm_plus.h | 2 ++ .../feature_manager/vp_feature_manager.cpp | 4 ++- .../vp_platform_interface.h | 33 ++++++++++++++++++- 10 files changed, 71 insertions(+), 2 deletions(-) diff --git a/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/vp/hal/platform_interface/vp_platform_interface_xe_hpm.cpp b/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/vp/hal/platform_interface/vp_platform_interface_xe_hpm.cpp index 04ac65cca96..f530bfb0dd7 100644 --- a/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/vp/hal/platform_interface/vp_platform_interface_xe_hpm.cpp +++ b/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/vp/hal/platform_interface/vp_platform_interface_xe_hpm.cpp @@ -263,3 +263,10 @@ MOS_STATUS VpPlatformInterfaceXe_Hpm::ConfigureVpScalability(VP_MHWINTERFACE &vp return MOS_STATUS_SUCCESS; } + +MOS_STATUS VpPlatformInterfaceXe_Hpm::InitVpFeatureSupportBits() +{ + VP_FUNC_CALL(); + VP_PUBLIC_CHK_STATUS_RETURN(VpPlatformInterface::InitVpFeatureSupportBits()); + return MOS_STATUS_SUCCESS; +} \ No newline at end of file diff --git a/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/vp/hal/platform_interface/vp_platform_interface_xe_hpm.h b/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/vp/hal/platform_interface/vp_platform_interface_xe_hpm.h index 2f15bdc8eba..a8afc367086 100644 --- a/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/vp/hal/platform_interface/vp_platform_interface_xe_hpm.h +++ b/media_driver/media_softlet/agnostic/Xe_M/Xe_HPM/vp/hal/platform_interface/vp_platform_interface_xe_hpm.h @@ -111,6 +111,8 @@ class VpPlatformInterfaceXe_Hpm : public VpPlatformInterface return true; } + virtual MOS_STATUS InitVpFeatureSupportBits() override; + protected: bool m_disableSfcDithering = false; diff --git a/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/vp/hal/platform_interface/vp_platform_interface_xe2_lpm.cpp b/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/vp/hal/platform_interface/vp_platform_interface_xe2_lpm.cpp index 74eecbff68e..e08e01bbd18 100644 --- a/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/vp/hal/platform_interface/vp_platform_interface_xe2_lpm.cpp +++ b/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/vp/hal/platform_interface/vp_platform_interface_xe2_lpm.cpp @@ -254,3 +254,10 @@ MOS_STATUS VpPlatformInterfacsXe2_Lpm::InitPolicyRules(VP_POLICY_RULES &rules) rules.is1K1DLutSurfaceInUse = true; return MOS_STATUS_SUCCESS; } + +MOS_STATUS VpPlatformInterfacsXe2_Lpm::InitVpFeatureSupportBits() +{ + VP_FUNC_CALL(); + VP_PUBLIC_CHK_STATUS_RETURN(VpPlatformInterface::InitVpFeatureSupportBits()); + return MOS_STATUS_SUCCESS; +} diff --git a/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/vp/hal/platform_interface/vp_platform_interface_xe2_lpm.h b/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/vp/hal/platform_interface/vp_platform_interface_xe2_lpm.h index 01358a1c09a..f7dad20b784 100644 --- a/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/vp/hal/platform_interface/vp_platform_interface_xe2_lpm.h +++ b/media_softlet/agnostic/Xe2_M_plus/Xe2_LPM/vp/hal/platform_interface/vp_platform_interface_xe2_lpm.h @@ -74,6 +74,8 @@ class VpPlatformInterfacsXe2_Lpm : public VpPlatformInterface virtual MOS_STATUS InitPolicyRules(VP_POLICY_RULES &rules) override; + virtual MOS_STATUS InitVpFeatureSupportBits() override; + protected: bool m_disableSfcDithering = false; diff --git a/media_softlet/agnostic/Xe_M_plus/Xe2_HPM/vp/hal/platform_interface/vp_platform_interface_xe2_hpm.cpp b/media_softlet/agnostic/Xe_M_plus/Xe2_HPM/vp/hal/platform_interface/vp_platform_interface_xe2_hpm.cpp index d9ed243462f..1bd4ec57144 100644 --- a/media_softlet/agnostic/Xe_M_plus/Xe2_HPM/vp/hal/platform_interface/vp_platform_interface_xe2_hpm.cpp +++ b/media_softlet/agnostic/Xe_M_plus/Xe2_HPM/vp/hal/platform_interface/vp_platform_interface_xe2_hpm.cpp @@ -263,3 +263,10 @@ MOS_STATUS VpPlatformInterfaceXe2_Hpm::InitPolicyRules(VP_POLICY_RULES &rules) rules.isHDR33LutSizeEnabled = true; return MOS_STATUS_SUCCESS; } + +MOS_STATUS VpPlatformInterfaceXe2_Hpm::InitVpFeatureSupportBits() +{ + VP_FUNC_CALL(); + VP_PUBLIC_CHK_STATUS_RETURN(VpPlatformInterface::InitVpFeatureSupportBits()); + return MOS_STATUS_SUCCESS; +} diff --git a/media_softlet/agnostic/Xe_M_plus/Xe2_HPM/vp/hal/platform_interface/vp_platform_interface_xe2_hpm.h b/media_softlet/agnostic/Xe_M_plus/Xe2_HPM/vp/hal/platform_interface/vp_platform_interface_xe2_hpm.h index 0026c83d0ec..2d6b830f6e5 100644 --- a/media_softlet/agnostic/Xe_M_plus/Xe2_HPM/vp/hal/platform_interface/vp_platform_interface_xe2_hpm.h +++ b/media_softlet/agnostic/Xe_M_plus/Xe2_HPM/vp/hal/platform_interface/vp_platform_interface_xe2_hpm.h @@ -74,6 +74,8 @@ class VpPlatformInterfaceXe2_Hpm : public VpPlatformInterface virtual MOS_STATUS InitPolicyRules(VP_POLICY_RULES &rules) override; + virtual MOS_STATUS InitVpFeatureSupportBits() override; + virtual bool IsVeboxScalabilityWith4KNotSupported( VP_MHWINTERFACE vpMhwInterface); diff --git a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus/vp/hal/platform_interface/vp_platform_interface_xe_lpm_plus.cpp b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus/vp/hal/platform_interface/vp_platform_interface_xe_lpm_plus.cpp index 634e5b3d18b..7152e3e9ba5 100644 --- a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus/vp/hal/platform_interface/vp_platform_interface_xe_lpm_plus.cpp +++ b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus/vp/hal/platform_interface/vp_platform_interface_xe_lpm_plus.cpp @@ -185,3 +185,10 @@ MOS_STATUS VpPlatformInterfacesXe_Lpm_Plus::ConfigureVpScalability(VP_MHWINTERFA return MOS_STATUS_SUCCESS; } + +MOS_STATUS VpPlatformInterfacesXe_Lpm_Plus::InitVpFeatureSupportBits() +{ + VP_FUNC_CALL(); + VP_PUBLIC_CHK_STATUS_RETURN(VpPlatformInterface::InitVpFeatureSupportBits()); + return MOS_STATUS_SUCCESS; +} diff --git a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus/vp/hal/platform_interface/vp_platform_interface_xe_lpm_plus.h b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus/vp/hal/platform_interface/vp_platform_interface_xe_lpm_plus.h index e473d3e6e9e..4e685385548 100644 --- a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus/vp/hal/platform_interface/vp_platform_interface_xe_lpm_plus.h +++ b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus/vp/hal/platform_interface/vp_platform_interface_xe_lpm_plus.h @@ -93,6 +93,8 @@ class VpPlatformInterfacesXe_Lpm_Plus : public VpPlatformInterface return true; } + virtual MOS_STATUS InitVpFeatureSupportBits() override; + protected: bool m_disableSfcDithering = false; diff --git a/media_softlet/agnostic/common/vp/hal/feature_manager/vp_feature_manager.cpp b/media_softlet/agnostic/common/vp/hal/feature_manager/vp_feature_manager.cpp index 6b236b8eb46..3100b6bcc2d 100644 --- a/media_softlet/agnostic/common/vp/hal/feature_manager/vp_feature_manager.cpp +++ b/media_softlet/agnostic/common/vp/hal/feature_manager/vp_feature_manager.cpp @@ -55,7 +55,9 @@ MOS_STATUS VpFeatureManagerNext::Init(void* settings) m_policy = MOS_New(Policy, m_vpInterface); } VP_PUBLIC_CHK_NULL_RETURN(m_policy); - + vp::VpPlatformInterface *vpPlatformInterface = m_vpInterface.GetHwInterface()->m_vpPlatformInterface; + VP_PUBLIC_CHK_NULL_RETURN(vpPlatformInterface); + VP_PUBLIC_CHK_STATUS_RETURN(vpPlatformInterface->InitVpFeatureSupportBits()); VP_PUBLIC_CHK_STATUS_RETURN(RegisterFeatures()); return m_policy->Initialize(); } diff --git a/media_softlet/agnostic/common/vp/hal/platform_interface/vp_platform_interface.h b/media_softlet/agnostic/common/vp/hal/platform_interface/vp_platform_interface.h index 762177d5e7d..19dfe4c4e4c 100644 --- a/media_softlet/agnostic/common/vp/hal/platform_interface/vp_platform_interface.h +++ b/media_softlet/agnostic/common/vp/hal/platform_interface/vp_platform_interface.h @@ -41,6 +41,27 @@ class SfcRenderBase; class VpKernelSet; typedef void (*DelayLoadedFunc)(vp::VpPlatformInterface &vpPlatformInterface); +//! Struct VP_FEATURE_SUPPORT_BITS +//! \brief define VP support feature bits +//! +typedef struct _VP_FEATURE_SUPPORT_BITS +{ + union + { + struct + { +#ifdef _MEDIA_RESERVED +#include "vp_feature_support_bits_ext.h" +#else + uint64_t vpFeatureSupportBitsReserved : 1; +#endif + }; + uint64_t value = 0; + }; +} VP_FEATURE_SUPPORT_BITS; + +C_ASSERT(sizeof(_VP_FEATURE_SUPPORT_BITS) == sizeof(uint64_t)); + struct VP_KERNEL_BINARY_ENTRY { const uint32_t *kernelBin = nullptr; @@ -421,6 +442,16 @@ class VpPlatformInterface return false; } + virtual MOS_STATUS InitVpFeatureSupportBits() + { + return MOS_STATUS_SUCCESS; + } + + virtual VP_FEATURE_SUPPORT_BITS& GetVpFeatureSupportBits() + { + return m_vpFeatureSupportBits; + } + protected: PMOS_INTERFACE m_pOsInterface = nullptr; VP_KERNEL_BINARY m_vpKernelBinary = {}; //!< vp kernels @@ -445,7 +476,7 @@ class VpPlatformInterface bool m_isRenderDisabled = false; VpFrameTracker *m_frameTracker = nullptr; - + VP_FEATURE_SUPPORT_BITS m_vpFeatureSupportBits = {}; MEDIA_CLASS_DEFINE_END(vp__VpPlatformInterface) };