1 /* 2 * Copyright (c) 2024, Intel Corporation 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included 12 * in all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 */ 22 23 //! 24 //! \file vp_platform_interface_xe2_lpm.h 25 //! \brief platform specific vp interfaces. 26 //! 27 #ifndef __VP_PLATFORM_INTERFACE_XE2_LPM_H__ 28 #define __VP_PLATFORM_INTERFACE_XE2_LPM_H__ 29 30 #include "vp_platform_interface.h" 31 32 //! 33 //! \brief Vebox Statistics Surface definition for Xe2_LPM 34 //! 35 #define VP_VEBOX_STATISTICS_SIZE_XE2_LPM (32 * 8) 36 #define VP_VEBOX_STATISTICS_PER_FRAME_SIZE_XE2_LPM (32 * sizeof(uint32_t)) 37 #define VP_VEBOX_STATISTICS_SURFACE_FMD_OFFSET_XE2_LPM 0 38 #define VP_VEBOX_STATISTICS_SURFACE_GNE_OFFSET_XE2_LPM 0x2C 39 #define VP_VEBOX_STATISTICS_SURFACE_STD_OFFSET_XE2_LPM 0x44 40 #define VP_VEBOX_STATISTICS_SURFACE_SW_WA_OFFSET_XE2_LPM -12 41 42 namespace vp 43 { 44 45 class VpPlatformInterfacsXe2_Lpm : public VpPlatformInterface 46 { 47 public: 48 49 VpPlatformInterfacsXe2_Lpm(PMOS_INTERFACE pOsInterface, bool clearViewMode = false); 50 ~VpPlatformInterfacsXe2_Lpm()51 virtual ~VpPlatformInterfacsXe2_Lpm() 52 {} 53 54 virtual MOS_STATUS InitVpVeboxSfcHwCaps(VP_VEBOX_ENTRY_REC *veboxHwEntry, uint32_t veboxEntryCount, VP_SFC_ENTRY_REC *sfcHwEntry, uint32_t sfcEntryCount); 55 virtual MOS_STATUS InitVpRenderHwCaps(); 56 virtual VPFeatureManager *CreateFeatureChecker(_VP_MHWINTERFACE *hwInterface); 57 virtual VpCmdPacket *CreateVeboxPacket(MediaTask * task, _VP_MHWINTERFACE *hwInterface, VpAllocator *&allocator, VPMediaMemComp *mmc); 58 virtual MOS_STATUS CreateSfcRender(SfcRenderBase *&sfcRender, VP_MHWINTERFACE &vpMhwinterface, PVpAllocator allocator); 59 virtual VpCmdPacket *CreateRenderPacket(MediaTask * task, _VP_MHWINTERFACE *hwInterface, VpAllocator *&allocator, VPMediaMemComp *mmc, VpKernelSet* kernel); 60 virtual MOS_STATUS VeboxQueryStatLayout( 61 VEBOX_STAT_QUERY_TYPE queryType, 62 uint32_t* pQuery); VeboxQueryStaticSurfaceSize()63 virtual uint32_t VeboxQueryStaticSurfaceSize() 64 { 65 return VP_VEBOX_STATISTICS_SIZE_XE2_LPM; 66 } 67 68 //Only for get kernel binary in legacy path not being used in APO path. 69 virtual MOS_STATUS GetKernelBinary(const void *&kernelBin, uint32_t &kernelSize, const void *&patchKernelBin, uint32_t &patchKernelSize); 70 71 virtual MOS_STATUS ConfigVirtualEngine(); 72 73 virtual MOS_STATUS ConfigureVpScalability(VP_MHWINTERFACE &vpMhwInterface); 74 75 virtual MOS_STATUS InitPolicyRules(VP_POLICY_RULES &rules) override; 76 77 protected: 78 bool m_disableSfcDithering = false; 79 80 MEDIA_CLASS_DEFINE_END(vp__VpPlatformInterfacsXe2_Lpm) 81 }; 82 83 } 84 #endif // !__VP_PLATFORM_INTERFACE_XE2_LPM_H__ 85