Debian Codegraph @

media_driver/agnostic/gen9_bxt/hw/vdbox/mhw_vdbox_huc_g9_bxt.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_bxt.h
24 //! \brief Defines functions for constructing Vdbox HUC commands on Gen9 Bxt platforms
25 //!
26
27 #ifndef __MHW_VDBOX_HUC_G9_BXT_H__
28 #define __MHW_VDBOX_HUC_G9_BXT_H__
29
30 #include "mhw_vdbox_huc_generic.h"
31 #include "mhw_vdbox_huc_hwcmd_g9_bxt.h"
32 #include "mhw_mi_hwcmd_g9_X.h"
33
34 //! MHW Vdbox Huc interface for Gen9 BXT platforms
35 /*!
36 This class defines the Huc command construction functions for Gen9 BXT platform
37 */
38
39 class MhwVdboxHucInterfaceG9Bxt : public MhwVdboxHucInterfaceGeneric<mhw_vdbox_huc_g9_bxt, mhw_mi_g9_X>
40 {
41
42 public:
43 //!
44 //! \brief Constructor
45 //!
46 MhwVdboxHucInterfaceG9Bxt(
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 ~MhwVdboxHucInterfaceG9Bxt() { 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_hucFamilyBroxton;
71 }
72
73 static const uint32_t m_hucFamilyBroxton = 3;
74
75 protected:
76
77 MOS_STATUS AddHucPipeModeSelectCmd(
78 MOS_COMMAND_BUFFER *cmdBuffer,
79 MHW_VDBOX_PIPE_MODE_SELECT_PARAMS *params) override;
80
81 MOS_STATUS GetHucStateCommandSize(
82 uint32_t mode,
83 uint32_t *commandsSize,
84 uint32_t *patchListSize,
85 PMHW_VDBOX_STATE_CMDSIZE_PARAMS params) override;
86
87 void InitMmioRegisters();
88 };
89
90 #endif