diff --git a/media_driver/cmake/linux/media_gen_flags_linux.cmake b/media_driver/cmake/linux/media_gen_flags_linux.cmake index 65f857d239..d781766b74 100644 --- a/media_driver/cmake/linux/media_gen_flags_linux.cmake +++ b/media_driver/cmake/linux/media_gen_flags_linux.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2017, Intel Corporation +# Copyright (c) 2017-2023, Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -119,12 +119,14 @@ cmake_dependent_option(PVC option(MTL "Enable MTL support" ON) -if(MTL) +option(ARL "Enable ARL support" ON) + +if(MTL OR ARL) option(XE_LPM_PLUS_SUPPORT "Enable XE_LPM_PLUS support" ON) option(XE_LPG "Enable XE_LPG support" ON) endif() -if(MTL) +if(MTL OR ARL) option(Xe_M_plus "Enable Xe_M_plus support" ON) endif() @@ -242,4 +244,8 @@ if(MTL) add_definitions(-DIGFX_MTL_SUPPORTED) endif() +if(ARL) + add_definitions(-DIGFX_ARL_SUPPORTED) +endif() + include(${MEDIA_EXT_CMAKE}/ext/linux/media_gen_flags_linux_ext.cmake OPTIONAL) diff --git a/media_softlet/cmake/linux/media_gen_flags_linux.cmake b/media_softlet/cmake/linux/media_gen_flags_linux.cmake index 696e1ee24f..de5e5a121a 100644 --- a/media_softlet/cmake/linux/media_gen_flags_linux.cmake +++ b/media_softlet/cmake/linux/media_gen_flags_linux.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2021, Intel Corporation +# Copyright (c) 2021-2023, Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -20,4 +20,6 @@ option(MTL "Enable MTL support" ON) +option(ARL "Enable ARL support" ON) + include(${MEDIA_SOFTLET_EXT_CMAKE}/linux/media_gen_flags_linux_ext.cmake OPTIONAL) diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl.cpp index 3f584b9497..28999cb727 100644 --- a/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl.cpp +++ b/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl.cpp @@ -70,3 +70,6 @@ VAStatus MediaLibvaCapsMtl::GetDisplayAttributes( static bool mtlRegistered = MediaLibvaCapsFactory:: RegisterCaps((uint32_t)IGFX_METEORLAKE); + +static bool arlRegistered = MediaLibvaCapsFactory:: + RegisterCaps((uint32_t)IGFX_ARROWLAKE); diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp index e3a2921f63..91b2ed5eda 100644 --- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp +++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp @@ -301,3 +301,38 @@ static struct LinuxDeviceInit mtlDeviceInit = static bool mtlDeviceRegister = DeviceInfoFactory:: RegisterDevice(IGFX_METEORLAKE, &mtlDeviceInit); + +static bool InitArlMediaSku(struct GfxDeviceInfo *devInfo, + MediaFeatureTable * skuTable, + struct LinuxDriverInfo *drvInfo, + MediaUserSettingSharedPtr userSettingPtr) +{ + if (!InitMtlMediaSkuExt(devInfo, skuTable, drvInfo, userSettingPtr)) + { + return false; + } + + return true; +} + +static bool InitArlMediaWa(struct GfxDeviceInfo *devInfo, + MediaWaTable * waTable, + struct LinuxDriverInfo * drvInfo) +{ + if (!InitMtlMediaWaExt(devInfo, waTable, drvInfo)) + { + return false; + } + + return true; +} + +static struct LinuxDeviceInit arlDeviceInit = +{ + .productFamily = (uint32_t)IGFX_ARROWLAKE, + .InitMediaFeature = InitArlMediaSku, + .InitMediaWa = InitArlMediaWa, +}; + +static bool arlDeviceRegister = DeviceInfoFactory:: + RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit); \ No newline at end of file diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_srcs.cmake b/media_softlet/linux/Xe_M_plus/ddi/media_srcs.cmake index 6868edc288..c9568eb980 100644 --- a/media_softlet/linux/Xe_M_plus/ddi/media_srcs.cmake +++ b/media_softlet/linux/Xe_M_plus/ddi/media_srcs.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2017 - 2022, Intel Corporation +# Copyright (c) 2017-2023, Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp index d7bbe75a2e..426bd795fa 100644 --- a/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp +++ b/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp @@ -196,8 +196,26 @@ static bool mtlDevice7d45 = DeviceInfoFactory:: static bool mtlDevice7d60 = DeviceInfoFactory:: RegisterDevice(0x7D60, &mtlInfo); -static bool mtlDevice7d57 = DeviceInfoFactory:: - RegisterDevice(0x7D57, &mtlInfo); - -static bool mtlDevice7dD7 = DeviceInfoFactory:: - RegisterDevice(0x7DD7, &mtlInfo); +static struct GfxDeviceInfo arlInfo = { + .platformType = PLATFORM_MOBILE, + .productFamily = (uint32_t)IGFX_ARROWLAKE, + .displayFamily = IGFX_UNKNOWN_CORE, + .renderFamily = IGFX_GEN12_CORE, + .mediaFamily = IGFX_UNKNOWN_CORE, + .eGTType = GTTYPE_GT2, + .L3CacheSizeInKb = 0, + .L3BankCount = 0, + .EUCount = 0, + .SliceCount = 0, + .SubSliceCount = 0, + .MaxEuPerSubSlice = 0, + .isLCIA = 0, + .hasLLC = 0, + .hasERAM = 0, + .InitMediaSysInfo = InitMtlMediaSysInfo, + .InitShadowSku = InitMtlShadowSku, + .InitShadowWa = InitMtlShadowWa, +}; + +static bool arlsDevice7d67 = DeviceInfoFactory:: + RegisterDevice(0x7D67, &arlInfo); \ No newline at end of file diff --git a/media_softlet/linux/media_srcs.cmake b/media_softlet/linux/media_srcs.cmake index 3847848282..e9331c5486 100644 --- a/media_softlet/linux/media_srcs.cmake +++ b/media_softlet/linux/media_srcs.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2019, Intel Corporation +# Copyright (c) 2019-2023, Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -24,6 +24,6 @@ if(XE_LPM_PLUS_SUPPORT) media_include_subdirectory(xe_lpm_plus) endif() -if(MTL) +if(MTL OR ARL) media_include_subdirectory(Xe_M_plus) endif() diff --git a/media_softlet/media_interface/media_interfaces_arl/media_interfaces_arl.cpp b/media_softlet/media_interface/media_interfaces_arl/media_interfaces_arl.cpp new file mode 100644 index 0000000000..e8837703c8 --- /dev/null +++ b/media_softlet/media_interface/media_interfaces_arl/media_interfaces_arl.cpp @@ -0,0 +1,94 @@ +/*===================== begin_copyright_notice ================================== + +# Copyright (c) 2023, Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +======================= end_copyright_notice ==================================*/ +//! +//! \file media_interfaces_arl.cpp + +//! \brief Helps with ARL factory creation. +//! + +#include "media_interfaces_arl.h" + +#include "codechal_common.h" +#include "codechal_debug.h" + +#include "vp_pipeline_adapter_xe_lpm_plus.h" +#include "vp_platform_interface_xe_lpm_plus.h" +#include "mhw_mi_xe_lpm_plus_base_next_impl.h" +#include "mhw_blt_xe_lpm_plus_base_next_impl.h" +#include "mhw_sfc_xe_lpm_plus_base_next_impl.h" +#include "mhw_vebox_xe_lpm_plus_base_next_impl.h" +#include "mhw_render_xe_hpg_impl.h" + +#if defined(ENABLE_KERNELS) +#include "igvpkrn_xe_hpg.h" +#include "igvpkrn_xe_hpg_cmfcpatch.h" +#if !defined(_FULL_OPEN_SOURCE) +#include "igvpkrn_isa_xe_hpg.h" +#endif +#endif + +using namespace mhw::vdbox::avp::xe_lpm_plus_base; +using namespace mhw::vdbox::vdenc::xe_lpm_plus_base; +using namespace mhw::vdbox::huc::xe_lpm_plus_base; +using namespace mhw::vdbox::mfx::xe_lpm_plus_base; + +extern template class MediaFactory; +extern template class MediaFactory; +extern template class MediaFactory; +extern template class MediaFactory; + +// Swith to use new media factory template +extern template class MediaFactory; +extern template class MediaFactory; + +static bool arlRegisteredVphal = + MediaFactory:: + Register((uint32_t)IGFX_ARROWLAKE); + +static bool arlRegisteredMhwNext = + MediaFactory:: + Register((uint32_t)IGFX_ARROWLAKE); + +#ifdef _MMC_SUPPORTED +static bool arlRegisteredMmd = + MediaFactory:: + Register((uint32_t)IGFX_ARROWLAKE); +#endif + +static bool arlRegisteredMcpy = + MediaFactory:: + Register((uint32_t)IGFX_ARROWLAKE); + +static bool arlRegisteredCodecHal = + MediaFactory:: + Register((uint32_t)IGFX_ARROWLAKE); + +static bool arlRegisteredRenderHal = + MediaFactory:: + Register((uint32_t)IGFX_ARROWLAKE); + +static bool arlRegisteredHwInfo = + MediaFactory:: + Register((uint32_t)IGFX_ARROWLAKE); + diff --git a/media_softlet/media_interface/media_interfaces_arl/media_interfaces_arl.h b/media_softlet/media_interface/media_interfaces_arl/media_interfaces_arl.h new file mode 100644 index 0000000000..aac5781075 --- /dev/null +++ b/media_softlet/media_interface/media_interfaces_arl/media_interfaces_arl.h @@ -0,0 +1,118 @@ +/*===================== begin_copyright_notice ================================== + +# Copyright (c) 2023, Intel Corporation + +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +======================= end_copyright_notice ==================================*/ +//! +//! \file media_interfaces_arl.h +//! \brief All interfaces used for ARL that require factory creation +//! + +#ifndef __MEDIA_INTERFACES_ARL_H__ +#define __MEDIA_INTERFACES_ARL_H__ + +#include "media_interfaces_mtl.h" +#include "media_interfaces_mhw_next.h" +#include "media_interfaces_codechal_next.h" +#include "media_interfaces_mcpy_next.h" +#include "media_interfaces_mmd_next.h" + +#include "media_interfaces_vphal.h" +#include "media_interfaces_renderhal.h" +#include "media_interfaces_hwinfo_device.h" + +#include "mhw_cp_interface.h" + +#include "mhw_vdbox_mfx_impl_xe_lpm_plus.h" + +#include "mhw_vdbox_avp_impl_xe_lpm_plus.h" + +#include "mhw_vdbox_huc_impl_xe_lpm_plus.h" + +#include "mhw_vdbox_hcp_impl_xe_lpm_plus.h" + +#include "mhw_vdbox_vdenc_impl_xe_lpm_plus.h" + +#include "media_mem_decompress_xe_lpm_plus_base.h" +#include "media_copy_xe_lpm_plus_base.h" +#include "mhw_state_heap_xe_hpg.h" +#include "codec_hw_xe_lpm_plus_base.h" + +#ifdef _AVC_DECODE_SUPPORTED +#include "decode_avc_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _HEVC_DECODE_SUPPORTED +#include "decode_hevc_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _JPEG_DECODE_SUPPORTED +#include "decode_jpeg_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _MPEG2_DECODE_SUPPORTED +#include "decode_mpeg2_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _VP9_DECODE_SUPPORTED +#include "decode_vp9_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _VP8_DECODE_SUPPORTED +#include "decode_vp8_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _AV1_DECODE_SUPPORTED +#include "decode_av1_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _JPEG_ENCODE_SUPPORTED +#include "encode_jpeg_pipeline_adapter_xe_lpm_plus_base.h" +#endif + +#ifdef _HEVC_ENCODE_VDENC_SUPPORTED +#include "encode_hevc_vdenc_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _AV1_ENCODE_VDENC_SUPPORTED +#include "encode_av1_vdenc_pipeline_adapter_xe_lpm_plus.h" +#endif + +#ifdef _AVC_ENCODE_VDENC_SUPPORTED +#include "encode_avc_vdenc_pipeline_adapter_xe_lpm_plus_base.h" +#endif + +#ifdef _VP9_ENCODE_VDENC_SUPPORTED +#ifndef _APOGEIOS_SUPPORTED +#ifdef _MEDIA_RESERVED +#include "codechal_vdenc_vp9_xe_lpm_plus.h" +#endif +#endif +#include "encode_vp9_vdenc_pipeline_adapter_xe_lpm_plus.h" +#endif + +#include "renderhal_xe_hpg_next.h" + + +#include "decode_scalability_singlepipe_next.h" +#include "decode_scalability_multipipe_next.h" + +#endif // __MEDIA_INTERFACES_ARL_H__ diff --git a/media_softlet/media_interface/media_interfaces_arl/media_srcs.cmake b/media_softlet/media_interface/media_interfaces_arl/media_srcs.cmake new file mode 100644 index 0000000000..4fc5413949 --- /dev/null +++ b/media_softlet/media_interface/media_interfaces_arl/media_srcs.cmake @@ -0,0 +1,42 @@ +# Copyright (c) 2023, Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +set(TMP_SOURCES_ + ${CMAKE_CURRENT_LIST_DIR}/media_interfaces_arl.cpp +) + +set(TMP_HEADERS_ + ${CMAKE_CURRENT_LIST_DIR}/media_interfaces_arl.h +) + +set(SOFTLET_COMMON_SOURCES_ + ${SOFTLET_COMMON_SOURCES_} + ${TMP_SOURCES_} +) + +set(SOFTLET_COMMON_HEADERS_ + ${SOFTLET_COMMON_HEADERS_} + ${TMP_HEADERS_} +) + +set(SOFTLET_COMMON_PRIVATE_INCLUDE_DIRS_ + ${SOFTLET_COMMON_PRIVATE_INCLUDE_DIRS_} + ${CMAKE_CURRENT_LIST_DIR} +) \ No newline at end of file diff --git a/media_softlet/media_interface/media_srcs.cmake b/media_softlet/media_interface/media_srcs.cmake index 4a9dd7260f..3818f00b51 100644 --- a/media_softlet/media_interface/media_srcs.cmake +++ b/media_softlet/media_interface/media_srcs.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2022, Intel Corporation +# Copyright (c) 2022-2023, Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -21,3 +21,7 @@ if(MTL) media_include_subdirectory(media_interfaces_mtl) endif() + +if(ARL) + media_include_subdirectory(media_interfaces_arl) +endif()