1 /* 2 * Copyright (c) 2020-2021, 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_xe_lpm_plus.h 25 //! \brief platform specific vp interfaces. 26 //! 27 #ifndef __VP_PLATFORM_INTERFACE_XE_LPM_PLUS_H__ 28 #define __VP_PLATFORM_INTERFACE_XE_LPM_PLUS_H__ 29 30 #include "vp_platform_interface.h" 31 32 //! 33 //! \brief Vebox Statistics Surface definition for Xe_LPM_plus 34 //! 35 #define VP_VEBOX_STATISTICS_SIZE_XE_LPM_PLUS (32 * 8) 36 #define VP_VEBOX_STATISTICS_PER_FRAME_SIZE_XE_LPM_PLUS (32 * sizeof(uint32_t)) 37 #define VP_VEBOX_STATISTICS_SURFACE_FMD_OFFSET_XE_LPM_PLUS 0 38 #define VP_VEBOX_STATISTICS_SURFACE_GNE_OFFSET_XE_LPM_PLUS 0x2C 39 #define VP_VEBOX_STATISTICS_SURFACE_STD_OFFSET_XE_LPM_PLUS 0x44 40 #define VP_VEBOX_STATISTICS_SURFACE_SW_WA_OFFSET_XE_LPM_PLUS -12 41 42 namespace vp 43 { 44 45 class VpPlatformInterfacesXe_Lpm_Plus : public VpPlatformInterface 46 { 47 public: 48 49 VpPlatformInterfacesXe_Lpm_Plus(PMOS_INTERFACE pOsInterface, bool clearViewMode = false); 50 ~VpPlatformInterfacesXe_Lpm_Plus()51 virtual ~VpPlatformInterfacesXe_Lpm_Plus() 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 VPFeatureManager *CreateFeatureChecker(_VP_MHWINTERFACE *hwInterface); 56 virtual VpCmdPacket *CreateVeboxPacket(MediaTask * task, _VP_MHWINTERFACE *hwInterface, VpAllocator *&allocator, VPMediaMemComp *mmc); 57 virtual MOS_STATUS CreateSfcRender(SfcRenderBase *&sfcRender, VP_MHWINTERFACE &vpMhwinterface, PVpAllocator allocator); 58 virtual VpCmdPacket *CreateRenderPacket(MediaTask * task, _VP_MHWINTERFACE *hwInterface, VpAllocator *&allocator, VPMediaMemComp *mmc, VpKernelSet* kernel); 59 virtual MOS_STATUS VeboxQueryStatLayout( 60 VEBOX_STAT_QUERY_TYPE queryType, 61 uint32_t* pQuery); VeboxQueryStaticSurfaceSize()62 virtual uint32_t VeboxQueryStaticSurfaceSize() 63 { 64 return VP_VEBOX_STATISTICS_SIZE_XE_LPM_PLUS; 65 } 66 67 virtual MOS_STATUS ConfigVirtualEngine(); 68 69 virtual MOS_STATUS ConfigureVpScalability(VP_MHWINTERFACE &vpMhwInterface); 70 IsEufusionBypassWaEnabled()71 virtual bool IsEufusionBypassWaEnabled() 72 { 73 return true; 74 } 75 IsAdvanceNativeKernelSupported()76 virtual bool IsAdvanceNativeKernelSupported() 77 { 78 return false; 79 } 80 IsRenderMMCLimitationCheckNeeded()81 virtual bool IsRenderMMCLimitationCheckNeeded() 82 { 83 return true; 84 } 85 IsDecompForInterlacedSurfWaEnabled()86 virtual bool IsDecompForInterlacedSurfWaEnabled() 87 { 88 return true; 89 } 90 IsLegacyEuCountInUse()91 virtual bool IsLegacyEuCountInUse() 92 { 93 return true; 94 } 95 96 protected: 97 bool m_disableSfcDithering = false; 98 99 MEDIA_CLASS_DEFINE_END(vp__VpPlatformInterfacesXe_Lpm_Plus) 100 }; 101 102 } 103 #endif // !__VP_PLATFORM_INTERFACE_XE_LPM_PLUS_H__ 104