File tree Expand file tree Collapse file tree 4 files changed +45
-5
lines changed
opencl/test/unit_test/os_interface/linux
shared/source/os_interface/linux Expand file tree Collapse file tree 4 files changed +45
-5
lines changed Original file line number Diff line number Diff line change @@ -754,6 +754,13 @@ else()
754754 set (NEO_EXTRA_LIBS dl pthread rt)
755755endif ()
756756
757+ if (UNIX )
758+ # prelim headers detection
759+ if ((NOT DEFINED NEO_ENABLE_i915_PRELIM_DETECTION) OR NOT ("${BRANCH_TYPE} " STREQUAL "" ))
760+ set (NEO_ENABLE_i915_PRELIM_DETECTION TRUE )
761+ endif ()
762+ message (STATUS "i915 prelim headers detection: ${NEO_ENABLE_i915_PRELIM_DETECTION} " )
763+ endif ()
757764add_subdirectory_unique(shared)
758765
759766if (NEO_BUILD_WITH_OCL)
Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ set(IGDRCL_SRCS_tests_os_interface_linux
3434 ${CMAKE_CURRENT_SOURCE_DIR} /hw_info_config_linux_tests.cpp
3535 ${CMAKE_CURRENT_SOURCE_DIR} /hw_info_config_linux_tests.h
3636 ${CMAKE_CURRENT_SOURCE_DIR} /linux_create_command_queue_with_properties_tests.cpp
37- ${CMAKE_CURRENT_SOURCE_DIR} /ioctl_helper_tests_prelim.cpp
38- ${CMAKE_CURRENT_SOURCE_DIR} /prelim_helper_func.cpp
3937 ${CMAKE_CURRENT_SOURCE_DIR} /mock_os_time_linux.h
4038 ${CMAKE_CURRENT_SOURCE_DIR} /mock_performance_counters_linux.cpp
4139 ${CMAKE_CURRENT_SOURCE_DIR} /mock_performance_counters_linux.h
@@ -52,11 +50,18 @@ if(NEO__LIBVA_FOUND)
5250 )
5351endif ()
5452
55- if (TESTS_DG1 AND " ${BRANCH_TYPE} " STREQUAL "" )
53+ if (NEO_ENABLE_i915_PRELIM_DETECTION )
5654 list (APPEND IGDRCL_SRCS_tests_os_interface_linux
57- ${CMAKE_CURRENT_SOURCE_DIR} /ioctl_helper_tests_dg1 .cpp
58- ${CMAKE_CURRENT_SOURCE_DIR} /drm_mock_prod_dg1.h
55+ ${CMAKE_CURRENT_SOURCE_DIR} /ioctl_helper_tests_prelim .cpp
56+ ${CMAKE_CURRENT_SOURCE_DIR} /prelim_helper_func.cpp
5957 )
58+
59+ if (TESTS_DG1 AND "${BRANCH_TYPE} " STREQUAL "" )
60+ list (APPEND IGDRCL_SRCS_tests_os_interface_linux
61+ ${CMAKE_CURRENT_SOURCE_DIR} /ioctl_helper_tests_dg1.cpp
62+ ${CMAKE_CURRENT_SOURCE_DIR} /drm_mock_prod_dg1.h
63+ )
64+ endif ()
6065endif ()
6166
6267if ("${BRANCH_TYPE} " STREQUAL "" )
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ set(NEO_CORE_OS_INTERFACE_LINUX
8888 ${CMAKE_CURRENT_SOURCE_DIR} /pmt_util.cpp
8989 ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX} /system_info_extended.cpp
9090)
91+
9192if (SUPPORT_XEHP_AND_LATER)
9293 list (APPEND NEO_CORE_OS_INTERFACE_LINUX
9394 ${CMAKE_CURRENT_SOURCE_DIR} /drm_command_stream_xehp_and_later.inl
@@ -110,6 +111,14 @@ if("${BRANCH_TYPE}" STREQUAL "")
110111 list (APPEND NEO_CORE_OS_INTERFACE_LINUX
111112 ${CMAKE_CURRENT_SOURCE_DIR} /ioctl_helper_upstream.cpp
112113 )
114+ if (NOT NEO_ENABLE_i915_PRELIM_DETECTION)
115+ list (APPEND NEO_CORE_OS_INTERFACE_LINUX
116+ ${CMAKE_CURRENT_SOURCE_DIR} /ioctl_helper_getter_upstream.cpp
117+ )
118+ list (REMOVE_ITEM NEO_CORE_OS_INTERFACE_LINUX
119+ ${CMAKE_CURRENT_SOURCE_DIR} /ioctl_helper_getter.cpp
120+ )
121+ endif ()
113122endif ()
114123
115124set_property (GLOBAL PROPERTY NEO_CORE_OS_INTERFACE_LINUX ${NEO_CORE_OS_INTERFACE_LINUX} )
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2022 Intel Corporation
3+ *
4+ * SPDX-License-Identifier: MIT
5+ *
6+ */
7+
8+ #include " shared/source/os_interface/linux/ioctl_helper.h"
9+
10+ #include < memory>
11+
12+ namespace NEO {
13+ IoctlHelper *ioctlHelperFactory[IGFX_MAX_PRODUCT] = {};
14+ static auto ioctlHelper = std::make_unique<IoctlHelperUpstream>();
15+ IoctlHelper *IoctlHelper::get (Drm *drm) {
16+ return ioctlHelper.get ();
17+ }
18+
19+ } // namespace NEO
You can’t perform that action at this time.
0 commit comments