xref: /aosp_15_r20/external/intel-media-driver/media_driver/agnostic/gen11/vp/hal/vphal_renderer_g11.h (revision ba62d9d3abf0e404f2022b4cd7a85e107f48596f)
1 /*
2 * Copyright (c) 2012-2018, 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     vphal_renderer_g11.h
24 //! \brief    The header file of VPHAL top level rendering component
25 //! \details  The top renderer is responsible for coordinating the sequence of calls to low level renderers, e.g. DNDI or Comp
26 //!
27 #ifndef __VPHAL_RENDERER_G11_H__
28 #define __VPHAL_RENDERER_G11_H__
29 
30 #include "vphal_renderer.h"
31 
32 const VphalSseuSetting VpHalDefaultSSEUTableG11[baseKernelMaxNumID] =
33 {
34     // Slice    Sub-Slice       EU      Rsvd(freq)
35     { 2,            8,          8,          0 },     // COMBINED_FC_KERNEL Default
36 
37     // 2 VEBOX KERNELS
38     { 2,            8,          8,          0 },     // VEBOX_SECUREBLOCKCOPY_KERNEL,
39     { 2,            8,          8,          0 },     // VEBOX_UPDATEDNSTATE_KERNEL,
40 };
41 
42 //!
43 //! \brief VPHAL renderer Gen11 class
44 //!
45 class VphalRendererG11 : public VphalRenderer
46 {
47 public:
48     //!
49     //! \brief    VphalRendererG11 constructor
50     //! \details  Based on the HW and OS info, initialize the renderer interfaces
51     //! \param    [in,out] pRenderHal
52     //!           Pointer to RenderHal Interface Structure
53     //! \param    [in,out] pStatus
54     //!           Pointer to the MOS_STATUS flag.
55     //!           Will assign this flag to MOS_STATUS_SUCCESS if successful, otherwise failed
56     //!
VphalRendererG11(PRENDERHAL_INTERFACE pRenderHal,MOS_STATUS * pStatus)57     VphalRendererG11(
58         PRENDERHAL_INTERFACE                pRenderHal,
59         MOS_STATUS                          *pStatus) :
60         VphalRenderer(pRenderHal, pStatus)
61     {
62         // Set SSEUTable
63         pRenderHal->sseuTable = VpHalDefaultSSEUTableG11;
64     }
65 
66     //!
67     //! \brief    VPHAL renderer destructor
68     //! \details  Destory the resources allocated for the renderers
69     //!           including VEBOX and Composite.
70     //! \param    [in,out] VphalRenderer* pRenderer
71     //!           VPHAL renderer pointer
72     //! \return   VOID
73     //!
~VphalRendererG11()74     virtual ~VphalRendererG11()
75     {
76     }
77 
78     //!
79     //! \brief    Get Renderer Cache Settings
80     //! \details  Get cache settings for various VP features
81     //! \param    [in] pOsInterface
82     //!           OS Interface
83     //! \param    [in] pPlatform
84     //!           Platform Pointer
85     //! \param    [in] pSkuTable
86     //!           SKU feature table
87     //! \param    [in,out] pSettings
88     //!           Pointer to Render Cache Control Settings
89     //! \return   void
90     //!
91     virtual void GetCacheCntl(
92         PMOS_INTERFACE                      pOsInterface,
93         PLATFORM                            *pPlatform,
94         MEDIA_FEATURE_TABLE                 *pSkuTable,
95         PVPHAL_RENDER_CACHE_CNTL            pSettings);
96 
97     //!
98     //! \brief    Allocate render components
99     //! \details  Allocate render components
100     //! \param    [in] pVeboxInterface
101     //!           Pointer to Vebox Interface Structure
102     //! \param    [in] pSfcInterface
103     //!           Pointer to SFC interface Structure
104     //! \return   MOS_STATUS
105     //!           Return MOS_STATUS_SUCCESS if successful, otherwise failed
106     //!
107     virtual MOS_STATUS AllocateRenderComponents(
108         PMHW_VEBOX_INTERFACE                pVeboxInterface,
109         PMHW_SFC_INTERFACE                  pSfcInterface);
110 
111     //!
112     //! \brief    Initialize the KDLL parameters
113     //! \details  Initialize the KDLL parameters
114     //! \return   MOS_STATUS
115     //!
116     virtual MOS_STATUS InitKdllParam() = 0;
117 };
118 
119 #endif // __VPHAL_RENDER_G11_H__
120