1 /* 2 * Copyright (c) 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 //! \file renderhal_platform_interface_next.h 24 //! \brief abstract the platfrom specific APIs into one class 25 //! 26 //! 27 //! \file renderhal.h 28 //! \brief Render Engine Interfaces shared across platforms 29 //! \details Platform Independent Hardware Interfaces 30 //! 31 #ifndef __RENDERHAL_PLATFORM_INTERFACE_NEXT_H__ 32 #define __RENDERHAL_PLATFORM_INTERFACE_NEXT_H__ 33 34 #include "mos_os.h" 35 #include "renderhal.h" 36 #include "renderhal_platform_interface.h" 37 #include "mhw_render_itf.h" 38 #include "mhw_render_cmdpar.h" 39 #include "media_packet.h" 40 #include "vp_utils.h" 41 #include "media_feature_manager.h" 42 43 class XRenderHal_Platform_Interface_Next : public XRenderHal_Platform_Interface, public mhw::render::Itf::ParSetting 44 { 45 public: XRenderHal_Platform_Interface_Next()46 XRenderHal_Platform_Interface_Next() {} ~XRenderHal_Platform_Interface_Next()47 virtual ~XRenderHal_Platform_Interface_Next() {} 48 49 MOS_STATUS AddPipelineSelectCmd( 50 PRENDERHAL_INTERFACE pRenderHal, 51 PMOS_COMMAND_BUFFER pCmdBuffer, 52 bool gpGpuPipe); 53 54 MOS_STATUS SendStateBaseAddress( 55 PRENDERHAL_INTERFACE pRenderHal, 56 PMOS_COMMAND_BUFFER pCmdBuffer); 57 58 MOS_STATUS AddSipStateCmd( 59 PRENDERHAL_INTERFACE pRenderHal, 60 PMOS_COMMAND_BUFFER pCmdBuffer); 61 62 MOS_STATUS AddCfeStateCmd( 63 PRENDERHAL_INTERFACE pRenderHal, 64 PMOS_COMMAND_BUFFER pCmdBuffer, 65 PMHW_VFE_PARAMS params); 66 67 MOS_STATUS SendChromaKey( 68 PRENDERHAL_INTERFACE pRenderHal, 69 PMOS_COMMAND_BUFFER pCmdBuffer); 70 71 MOS_STATUS SendPalette( 72 PRENDERHAL_INTERFACE pRenderHal, 73 PMOS_COMMAND_BUFFER pCmdBuffer); 74 75 MOS_STATUS SetL3Cache( 76 PRENDERHAL_INTERFACE pRenderHal, 77 PMOS_COMMAND_BUFFER pCmdBuffer); 78 79 PMHW_MI_MMIOREGISTERS GetMmioRegisters( 80 PRENDERHAL_INTERFACE pRenderHal); 81 82 MOS_STATUS EnablePreemption( 83 PRENDERHAL_INTERFACE pRenderHal, 84 PMOS_COMMAND_BUFFER pCmdBuffer); 85 86 protected: 87 88 PRENDERHAL_INTERFACE m_renderHal = nullptr; 89 MediaFeatureManager *m_featureManager = nullptr; 90 PMHW_GPGPU_WALKER_PARAMS m_gpgpuWalkerParams = nullptr; 91 PMHW_ID_ENTRY_PARAMS m_interfaceDescriptorParams = nullptr; 92 std::shared_ptr<mhw::render::Itf> m_renderItf = nullptr; 93 94 MEDIA_CLASS_DEFINE_END(XRenderHal_Platform_Interface_Next) 95 }; 96 97 #endif // __RENDERHAL_PLATFORM_INTERFACE_NEXT_H__ 98