Add cmake flag to disable i915 prelim headers detection

Related-To: NEO-6625
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-01-31 12:04:31 +01:00
committed by Compute-Runtime-Automation
parent 9d8ce7aace
commit f45fadf89b
4 changed files with 45 additions and 5 deletions

View File

@ -754,6 +754,13 @@ else()
set(NEO_EXTRA_LIBS dl pthread rt)
endif()
if(UNIX)
# prelim headers detection
if((NOT DEFINED NEO_ENABLE_i915_PRELIM_DETECTION) OR NOT ("${BRANCH_TYPE}" STREQUAL ""))
set(NEO_ENABLE_i915_PRELIM_DETECTION TRUE)
endif()
message(STATUS "i915 prelim headers detection: ${NEO_ENABLE_i915_PRELIM_DETECTION}")
endif()
add_subdirectory_unique(shared)
if(NEO_BUILD_WITH_OCL)

View File

@ -34,8 +34,6 @@ set(IGDRCL_SRCS_tests_os_interface_linux
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_linux_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_linux_tests.h
${CMAKE_CURRENT_SOURCE_DIR}/linux_create_command_queue_with_properties_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_tests_prelim.cpp
${CMAKE_CURRENT_SOURCE_DIR}/prelim_helper_func.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mock_os_time_linux.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_performance_counters_linux.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mock_performance_counters_linux.h
@ -52,11 +50,18 @@ if(NEO__LIBVA_FOUND)
)
endif()
if(TESTS_DG1 AND "${BRANCH_TYPE}" STREQUAL "")
if(NEO_ENABLE_i915_PRELIM_DETECTION)
list(APPEND IGDRCL_SRCS_tests_os_interface_linux
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_tests_dg1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/drm_mock_prod_dg1.h
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_tests_prelim.cpp
${CMAKE_CURRENT_SOURCE_DIR}/prelim_helper_func.cpp
)
if(TESTS_DG1 AND "${BRANCH_TYPE}" STREQUAL "")
list(APPEND IGDRCL_SRCS_tests_os_interface_linux
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_tests_dg1.cpp
${CMAKE_CURRENT_SOURCE_DIR}/drm_mock_prod_dg1.h
)
endif()
endif()
if("${BRANCH_TYPE}" STREQUAL "")

View File

@ -88,6 +88,7 @@ set(NEO_CORE_OS_INTERFACE_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/pmt_util.cpp
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/system_info_extended.cpp
)
if(SUPPORT_XEHP_AND_LATER)
list(APPEND NEO_CORE_OS_INTERFACE_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/drm_command_stream_xehp_and_later.inl
@ -110,6 +111,14 @@ if("${BRANCH_TYPE}" STREQUAL "")
list(APPEND NEO_CORE_OS_INTERFACE_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_upstream.cpp
)
if(NOT NEO_ENABLE_i915_PRELIM_DETECTION)
list(APPEND NEO_CORE_OS_INTERFACE_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_getter_upstream.cpp
)
list(REMOVE_ITEM NEO_CORE_OS_INTERFACE_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_getter.cpp
)
endif()
endif()
set_property(GLOBAL PROPERTY NEO_CORE_OS_INTERFACE_LINUX ${NEO_CORE_OS_INTERFACE_LINUX})

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/linux/ioctl_helper.h"
#include <memory>
namespace NEO {
IoctlHelper *ioctlHelperFactory[IGFX_MAX_PRODUCT] = {};
static auto ioctlHelper = std::make_unique<IoctlHelperUpstream>();
IoctlHelper *IoctlHelper::get(Drm *drm) {
return ioctlHelper.get();
}
} // namespace NEO