Debian Codegraph @

media_softlet/media_interface/media_interfaces_arl/media_interfaces_arl.cpp

raw
1 /*===================== begin_copyright_notice ==================================
2
3 # Copyright (c) 2023, Intel Corporation
4
5 # Permission is hereby granted, free of charge, to any person obtaining a
6 # copy of this software and associated documentation files (the "Software"),
7 # to deal in the Software without restriction, including without limitation
8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 # and/or sell copies of the Software, and to permit persons to whom the
10 # Software is furnished to do so, subject to the following conditions:
11
12 # The above copyright notice and this permission notice shall be included
13 # in all copies or substantial portions of the Software.
14
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 # OTHER DEALINGS IN THE SOFTWARE.
22
23 ======================= end_copyright_notice ==================================*/
24 //!
25 //! \file media_interfaces_arl.cpp
26
27 //! \brief Helps with ARL factory creation.
28 //!
29
30 #include "media_interfaces_arl.h"
31
32 #include "codechal_common.h"
33 #include "codechal_debug.h"
34
35 #include "vp_pipeline_adapter_xe_lpm_plus.h"
36 #include "vp_platform_interface_xe_lpm_plus.h"
37 #include "mhw_mi_xe_lpm_plus_base_next_impl.h"
38 #include "mhw_blt_xe_lpm_plus_base_next_impl.h"
39 #include "mhw_sfc_xe_lpm_plus_base_next_impl.h"
40 #include "mhw_vebox_xe_lpm_plus_base_next_impl.h"
41 #include "mhw_render_xe_hpg_impl.h"
42
43 #if defined(ENABLE_KERNELS)
44 #include "igvpkrn_xe_hpg.h"
45 #include "igvpkrn_xe_hpg_cmfcpatch.h"
46 #if !defined(_FULL_OPEN_SOURCE)
47 #include "igvpkrn_isa_xe_hpg.h"
48 #endif
49 #endif
50
51 using namespace mhw::vdbox::avp::xe_lpm_plus_base;
52 using namespace mhw::vdbox::vdenc::xe_lpm_plus_base;
53 using namespace mhw::vdbox::huc::xe_lpm_plus_base;
54 using namespace mhw::vdbox::mfx::xe_lpm_plus_base;
55
56 extern template class MediaFactory<uint32_t, CodechalDeviceNext>;
57 extern template class MediaFactory<uint32_t, VphalDevice>;
58 extern template class MediaFactory<uint32_t, RenderHalDevice>;
59 extern template class MediaFactory<uint32_t, MediaInterfacesHwInfoDevice>;
60
61 // Swith to use new media factory template
62 extern template class MediaFactory<uint32_t, MhwInterfacesNext>;
63 extern template class MediaFactory<uint32_t, MmdDeviceNext>;
64
65 static bool arlRegisteredVphal =
66 MediaFactory<uint32_t, VphalDevice>::
67 Register<VphalInterfacesXe_Lpm_Plus>((uint32_t)IGFX_ARROWLAKE);
68
69 static bool arlRegisteredMhwNext =
70 MediaFactory<uint32_t, MhwInterfacesNext>::
71 Register<MhwInterfacesXe_Lpm_Plus_Next>((uint32_t)IGFX_ARROWLAKE);
72
73 static bool arlRegisteredMmd =
74 MediaFactory<uint32_t, MmdDeviceNext>::
75 Register<MmdDeviceXe_Lpm_Plus_Next>((uint32_t)IGFX_ARROWLAKE);
76
77 static bool arlRegisteredMcpy =
78 MediaFactory<uint32_t, McpyDeviceNext>::
79 Register<McpyDeviceXe_Lpm_Plus>((uint32_t)IGFX_ARROWLAKE);
80
81 static bool arlRegisteredCodecHal =
82 MediaFactory<uint32_t, CodechalDeviceNext>::
83 Register<CodechalInterfacesXe_Lpm_Plus>((uint32_t)IGFX_ARROWLAKE);
84
85 static bool arlRegisteredRenderHal =
86 MediaFactory<uint32_t, RenderHalDevice>::
87 Register<RenderHalInterfacesXe_Lpg>((uint32_t)IGFX_ARROWLAKE);
88
89 #define IP_VERSION_XE_LPM_PLUS_EXT 0x1302
90 static bool arlRegisteredHwInfo =
91 MediaFactory<uint32_t, MediaInterfacesHwInfoDevice>::
92 Register<MediaInterfacesHwInfoDeviceXe_Lpm_Plus_Ext>((uint32_t)IGFX_ARROWLAKE);
93
94 MOS_STATUS MediaInterfacesHwInfoDeviceXe_Lpm_Plus_Ext::Initialize(PLATFORM platform)
95 {
96 m_hwInfo.SetDeviceInfo(IP_VERSION_XE_LPM_PLUS_EXT, platform.usRevId);
97 return MOS_STATUS_SUCCESS;
98 }