Debian Codegraph @

media_driver/agnostic/gen9_skl/hw/vdbox/mhw_vdbox_huc_g9_skl.h

raw
1 /*
2 * Copyright (c) 2017, 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 mhw_vdbox_huc_g9_skl.h
24 //! \brief Defines functions for constructing Vdbox HUC commands on Gen9-SKL platform
25 //!
26
27 #ifndef __MHW_VDBOX_HUC_G9_SKL_H__
28 #define __MHW_VDBOX_HUC_G9_SKL_H__
29
30 #include "mhw_vdbox_huc_generic.h"
31 #include "mhw_vdbox_huc_hwcmd_g9_skl.h"
32 #include "mhw_mi_hwcmd_g9_X.h"
33
34 //! MHW Vdbox Huc interface for Gen9 SKL
35 /*!
36 This class defines the Huc command construction functions for Gen9 skl platform
37 */
38
39 class MhwVdboxHucInterfaceG9Skl : public MhwVdboxHucInterfaceGeneric<mhw_vdbox_huc_g9_skl, mhw_mi_g9_X>
40 {
41
42 public:
43 //!
44 //! \brief Constructor
45 //!
46 MhwVdboxHucInterfaceG9Skl(
47 PMOS_INTERFACE osInterface,
48 MhwMiInterface *miInterface,
49 MhwCpInterface *cpInterface) :
50 MhwVdboxHucInterfaceGeneric(osInterface, miInterface, cpInterface)
51 {
52 MHW_FUNCTION_ENTER;
53
54 InitMmioRegisters();
55 }
56
57 //!
58 //! \brief Destructor
59 //!
60 virtual ~MhwVdboxHucInterfaceG9Skl() { MHW_FUNCTION_ENTER; }
61
62 //!
63 //! \brief Get huc product family
64 //!
65 //! \return uint32_t
66 //! Huc product family.
67 //!
68 uint32_t GetHucProductFamily() override
69 {
70 return m_hucFamilySkylake;
71 }
72
73 static const uint32_t m_hucFamilySkylake = 2;
74
75 protected:
76 MOS_STATUS GetHucStateCommandSize(
77 uint32_t mode,
78 uint32_t *commandsSize,
79 uint32_t *patchListSize,
80 PMHW_VDBOX_STATE_CMDSIZE_PARAMS params) override;
81
82 void InitMmioRegisters();
83 };
84
85 #endif