feature(sysman): Add product helper support in windows
Related-To: NEO-10850 Signed-off-by: shubham kumar <shubham.kumar@intel.com>
This commit is contained in:
parent
1af48cec4e
commit
839a150288
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2023 Intel Corporation
|
||||
# Copyright (C) 2023-2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
@ -17,4 +17,5 @@ if(WIN32)
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/zes_os_sysman_driver_imp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/zes_os_sysman_driver_imp.h
|
||||
)
|
||||
add_subdirectories()
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_hw.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_hw.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper.cpp
|
||||
)
|
||||
|
||||
add_subdirectories()
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_ICLLP)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_icllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_icllp.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_ICELAKE_LP> enableIcllp;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_ICELAKE_LP;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_ADLN)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_adln.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_adln.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_ALDERLAKE_N> enableAdln;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_N;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_ADLP)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_adlp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_adlp.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_ALDERLAKE_P> enableAdlp;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_P;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_ADLS)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_adls.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_adls.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_ALDERLAKE_S> enableAdls;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_S;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_DG1)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_dg1.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_dg1.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_DG1> enableDg1;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_DG1;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_RKL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_rkl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_rkl.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_ROCKETLAKE> enableRkl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ROCKETLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_TGLLP)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_tgllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_tgllp.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_TIGERLAKE_LP> enableTgllp;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_CFL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_cfl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_cfl.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_COFFEELAKE> enableCfl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_COFFEELAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_KBL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_kbl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_kbl.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_KABYLAKE> enableKbl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_KABYLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_SKL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_skl.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_SKYLAKE> enableSkl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_SKYLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
SysmanProductHelperCreateFunctionType sysmanProductHelperFactory[IGFX_MAX_PRODUCT] = {};
|
||||
|
||||
}
|
||||
} // namespace L0
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <level_zero/ze_api.h>
|
||||
#include <level_zero/zes_api.h>
|
||||
|
||||
#include "igfxfmid.h"
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
class Drm;
|
||||
}
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
class SysmanProductHelper;
|
||||
|
||||
using SysmanProductHelperCreateFunctionType = std::unique_ptr<SysmanProductHelper> (*)();
|
||||
extern SysmanProductHelperCreateFunctionType sysmanProductHelperFactory[IGFX_MAX_PRODUCT];
|
||||
|
||||
class SysmanProductHelper {
|
||||
public:
|
||||
static std::unique_ptr<SysmanProductHelper> create(PRODUCT_FAMILY product) {
|
||||
auto productHelperCreateFunction = sysmanProductHelperFactory[product];
|
||||
if (productHelperCreateFunction == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
auto productHelper = productHelperCreateFunction();
|
||||
return productHelper;
|
||||
}
|
||||
|
||||
virtual ~SysmanProductHelper() = default;
|
||||
|
||||
protected:
|
||||
SysmanProductHelper() = default;
|
||||
};
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
class SysmanProductHelperHw : public SysmanProductHelper {
|
||||
public:
|
||||
static std::unique_ptr<SysmanProductHelper> create() {
|
||||
auto pSysmanProductHelper = std::unique_ptr<SysmanProductHelper>(new SysmanProductHelperHw());
|
||||
return pSysmanProductHelper;
|
||||
}
|
||||
|
||||
~SysmanProductHelperHw() override = default;
|
||||
|
||||
protected:
|
||||
SysmanProductHelperHw() = default;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
struct EnableSysmanProductHelper {
|
||||
EnableSysmanProductHelper() {
|
||||
auto sysmanProductHelperCreateFunction = SysmanProductHelperHw<gfxProduct>::create;
|
||||
sysmanProductHelperFactory[gfxProduct] = sysmanProductHelperCreateFunction;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
|
@ -0,0 +1,13 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_PVC)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_pvc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_pvc.cpp
|
||||
)
|
||||
endif()
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_PVC> enablePvc;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_PVC;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_ARL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_arl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_arl.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_ARROWLAKE> enableArl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_ARROWLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_DG2)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_dg2.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_dg2.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_DG2> enableDg2;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_DG2;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,14 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_MTL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_mtl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_mtl.cpp
|
||||
)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_METEORLAKE> enableMtl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
constexpr static auto gfxProduct = IGFX_METEORLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -12,6 +12,7 @@
|
|||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
|
||||
#include "level_zero/sysman/source/shared/firmware_util/sysman_firmware_util.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper.h"
|
||||
#include "level_zero/sysman/source/shared/windows/sysman_kmd_sys_manager.h"
|
||||
|
||||
namespace L0 {
|
||||
|
@ -35,6 +36,9 @@ ze_result_t WddmSysmanImp::init() {
|
|||
subDeviceCount = 0;
|
||||
}
|
||||
|
||||
pSysmanProductHelper = SysmanProductHelper::create(getProductFamily());
|
||||
DEBUG_BREAK_IF(nullptr == pSysmanProductHelper);
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -46,6 +50,11 @@ SysmanDeviceImp *WddmSysmanImp::getSysmanDeviceImp() {
|
|||
return pParentSysmanDeviceImp;
|
||||
}
|
||||
|
||||
SysmanProductHelper *WddmSysmanImp::getSysmanProductHelper() {
|
||||
UNRECOVERABLE_IF(nullptr == pSysmanProductHelper);
|
||||
return pSysmanProductHelper.get();
|
||||
}
|
||||
|
||||
void WddmSysmanImp::createFwUtilInterface() {
|
||||
const auto pciBusInfo = pParentSysmanDeviceImp->getRootDeviceEnvironment().osInterface->getDriverModel()->getPciBusInfo();
|
||||
const uint16_t domain = static_cast<uint16_t>(pciBusInfo.pciDomain);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
@ -20,6 +20,7 @@ class Wddm;
|
|||
}
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
class SysmanProductHelper;
|
||||
|
||||
class WddmSysmanImp : public OsSysman, NEO::NonCopyableOrMovableClass {
|
||||
public:
|
||||
|
@ -36,11 +37,14 @@ class WddmSysmanImp : public OsSysman, NEO::NonCopyableOrMovableClass {
|
|||
uint32_t getSubDeviceCount() override;
|
||||
SysmanDeviceImp *getSysmanDeviceImp();
|
||||
const NEO::HardwareInfo &getHardwareInfo() const override { return pParentSysmanDeviceImp->getHardwareInfo(); }
|
||||
PRODUCT_FAMILY getProductFamily() const { return pParentSysmanDeviceImp->getProductFamily(); }
|
||||
SysmanProductHelper *getSysmanProductHelper();
|
||||
|
||||
protected:
|
||||
FirmwareUtil *pFwUtilInterface = nullptr;
|
||||
KmdSysManager *pKmdSysManager = nullptr;
|
||||
SysmanDevice *pDevice = nullptr;
|
||||
std::unique_ptr<SysmanProductHelper> pSysmanProductHelper;
|
||||
|
||||
private:
|
||||
SysmanDeviceImp *pParentSysmanDeviceImp = nullptr;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
# Copyright (C) 2020-2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
@ -15,4 +15,5 @@ if(WIN32)
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/test_sysman_driver.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_sysman_manager.cpp
|
||||
)
|
||||
add_subdirectories()
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mock_sysman_product_helper.cpp
|
||||
)
|
||||
endif()
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
template class L0::Sysman::SysmanProductHelperHw<IGFX_UNKNOWN>;
|
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(WIN32)
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_tests.cpp
|
||||
)
|
||||
endif()
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper.h"
|
||||
#include "level_zero/sysman/test/unit_tests/sources/windows/mock_sysman_fixture.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
namespace ult {
|
||||
|
||||
using SysmanProductHelperTest = SysmanDeviceFixture;
|
||||
|
||||
TEST_F(SysmanProductHelperTest, GivenValidWddmSysmanImpObjectWhenCallingGetSysmanProductHelperThenNotNullObjectIsReturned) {
|
||||
auto pSysmanProductHelper = pWddmSysmanImp->getSysmanProductHelper();
|
||||
EXPECT_NE(nullptr, pSysmanProductHelper);
|
||||
}
|
||||
|
||||
TEST_F(SysmanProductHelperTest, GivenInvalidProductFamilyWhenCallingProductHelperCreateThenNullPtrIsReturned) {
|
||||
auto pSysmanProductHelper = L0::Sysman::SysmanProductHelper::create(IGFX_UNKNOWN);
|
||||
EXPECT_EQ(nullptr, pSysmanProductHelper);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
Loading…
Reference in New Issue