From a2742492ab0cc84dd5a6512caaca4858c92caab8 Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Mon, 18 Mar 2024 14:29:33 +0000 Subject: [PATCH] feature: enable xe drm detection by default driver is built with xe drm support by default added cmake flag to control xe eu debug API support NEO_ENABLE_XE_EU_DEBUG_SUPPORT This flag is disabled by default and uapi-eu-debug headers are not needed for driver compilation as these headers are not a part of upstream kernel yet. Related-To: NEO-10780 Signed-off-by: Mateusz Jablonski --- CMakeLists.txt | 8 +-- .../core/source/dll/linux/CMakeLists.txt | 2 +- .../sources/engine/linux/CMakeLists.txt | 9 +-- .../tools/source/debug/linux/CMakeLists.txt | 2 +- .../sources/debug/linux/xe/CMakeLists.txt | 2 +- manifests/manifest.yml | 2 +- .../rhel_8/SPECS/l0_gpu_driver.spec | 4 +- .../sles_15/SPECS/l0_gpu_driver.spec | 4 +- .../l0_gpu_driver/ubuntu_20.04/debian/rules | 4 +- .../packaging/opencl/rhel_8/SPECS/opencl.spec | 4 +- .../opencl/sles_15/SPECS/opencl.spec | 4 +- .../opencl/ubuntu_20.04/debian/rules | 4 +- .../source/os_interface/linux/CMakeLists.txt | 7 -- .../source/os_interface/linux/drm_version.cpp | 20 ------ .../os_interface/linux/xe/CMakeLists.txt | 31 ++++---- .../xe/ioctl_helper_xe_debugger_stubs.cpp | 71 +++++++++++++++++++ .../os_interface/linux/xe/CMakeLists.txt | 32 +++++---- 17 files changed, 129 insertions(+), 81 deletions(-) delete mode 100644 shared/source/os_interface/linux/drm_version.cpp create mode 100644 shared/source/os_interface/linux/xe/ioctl_helper_xe_debugger_stubs.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 98d5bfb8ef..57969e3566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -524,11 +524,11 @@ if(UNIX) # drm-xe support if(NOT ("${BRANCH_TYPE}" STREQUAL "")) - set(NEO_ENABLE_XE_DRM_DETECTION TRUE) - elseif(NOT DEFINED NEO_ENABLE_XE_DRM_DETECTION) - set(NEO_ENABLE_XE_DRM_DETECTION FALSE) + set(NEO_ENABLE_XE_EU_DEBUG_SUPPORT TRUE) + elseif(NOT DEFINED NEO_ENABLE_XE_EU_DEBUG_SUPPORT) + set(NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE) endif() - message(STATUS "Xe drm detection: ${NEO_ENABLE_XE_DRM_DETECTION}") + message(STATUS "Xe EU Debug support: ${NEO_ENABLE_XE_EU_DEBUG_SUPPORT}") get_filename_component(THIRD_PARTY_DIR "${NEO_SOURCE_DIR}/third_party${BRANCH_DIR_SUFFIX}" ABSOLUTE) include_directories(BEFORE ${THIRD_PARTY_DIR}) diff --git a/level_zero/core/source/dll/linux/CMakeLists.txt b/level_zero/core/source/dll/linux/CMakeLists.txt index e66a4c672b..f12f8685c5 100644 --- a/level_zero/core/source/dll/linux/CMakeLists.txt +++ b/level_zero/core/source/dll/linux/CMakeLists.txt @@ -5,7 +5,7 @@ # if(UNIX) - if(NEO_ENABLE_XE_DRM_DETECTION) + if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT) target_sources(${TARGET_NAME_L0} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt diff --git a/level_zero/sysman/test/unit_tests/sources/engine/linux/CMakeLists.txt b/level_zero/sysman/test/unit_tests/sources/engine/linux/CMakeLists.txt index 5a90109e32..4d1602ecc0 100644 --- a/level_zero/sysman/test/unit_tests/sources/engine/linux/CMakeLists.txt +++ b/level_zero/sysman/test/unit_tests/sources/engine/linux/CMakeLists.txt @@ -6,6 +6,8 @@ set(L0_TESTS_SYSMAN_ENGINE_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/test_zes_engine_xe.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mock_engine_xe.h ) if(NEO_ENABLE_i915_PRELIM_DETECTION) @@ -21,13 +23,6 @@ else() ) endif() -if(NEO_ENABLE_XE_DRM_DETECTION) - list(APPEND L0_TESTS_SYSMAN_ENGINE_LINUX - ${CMAKE_CURRENT_SOURCE_DIR}/test_zes_engine_xe.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/mock_engine_xe.h - ) -endif() - if(UNIX) target_sources(${TARGET_NAME} PRIVATE diff --git a/level_zero/tools/source/debug/linux/CMakeLists.txt b/level_zero/tools/source/debug/linux/CMakeLists.txt index a528e75e5c..f926469697 100644 --- a/level_zero/tools/source/debug/linux/CMakeLists.txt +++ b/level_zero/tools/source/debug/linux/CMakeLists.txt @@ -20,7 +20,7 @@ if(UNIX) ) endif() - if(NEO_ENABLE_XE_DRM_DETECTION) + if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT) target_sources(${L0_STATIC_LIB_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/xe/debug_session.cpp diff --git a/level_zero/tools/test/unit_tests/sources/debug/linux/xe/CMakeLists.txt b/level_zero/tools/test/unit_tests/sources/debug/linux/xe/CMakeLists.txt index d96d774096..59eb101ef8 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/linux/xe/CMakeLists.txt +++ b/level_zero/tools/test/unit_tests/sources/debug/linux/xe/CMakeLists.txt @@ -5,7 +5,7 @@ # if(UNIX) - if(NEO_ENABLE_XE_DRM_DETECTION) + if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT) target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/test_debug_api_linux_xe.cpp diff --git a/manifests/manifest.yml b/manifests/manifest.yml index daa58c7152..5525cf572e 100644 --- a/manifests/manifest.yml +++ b/manifests/manifest.yml @@ -31,7 +31,7 @@ components: branch: master dest_dir: infra fetch_tags: true - revision: v5844 + revision: v5851 type: git internal: branch: master diff --git a/scripts/packaging/l0_gpu_driver/rhel_8/SPECS/l0_gpu_driver.spec b/scripts/packaging/l0_gpu_driver/rhel_8/SPECS/l0_gpu_driver.spec index a4e7daf7fc..c546d2c29a 100644 --- a/scripts/packaging/l0_gpu_driver/rhel_8/SPECS/l0_gpu_driver.spec +++ b/scripts/packaging/l0_gpu_driver/rhel_8/SPECS/l0_gpu_driver.spec @@ -3,7 +3,7 @@ %global rel xxx %global build_id xxx %global NEO_RELEASE_WITH_REGKEYS FALSE -%global NEO_ENABLE_XE_DRM_DETECTION FALSE +%global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE %global I915_HEADERS_DIR %{nil} %define _source_payload w5T16.xzdio @@ -66,7 +66,7 @@ cd build -DNEO_BUILD_WITH_OCL=FALSE \ -DNEO_SKIP_UNIT_TESTS=TRUE \ -DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \ - -DNEO_ENABLE_XE_DRM_DETECTION=%{NEO_ENABLE_XE_DRM_DETECTION} \ + -DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=%{NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \ -DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \ -DL0_INSTALL_UDEV_RULES=1 \ -DUDEV_RULES_DIR=/etc/udev/rules.d/ \ diff --git a/scripts/packaging/l0_gpu_driver/sles_15/SPECS/l0_gpu_driver.spec b/scripts/packaging/l0_gpu_driver/sles_15/SPECS/l0_gpu_driver.spec index 5cc3b00e1e..b5bcd8d4d9 100644 --- a/scripts/packaging/l0_gpu_driver/sles_15/SPECS/l0_gpu_driver.spec +++ b/scripts/packaging/l0_gpu_driver/sles_15/SPECS/l0_gpu_driver.spec @@ -5,7 +5,7 @@ %global rel xxx %global build_id xxx %global NEO_RELEASE_WITH_REGKEYS FALSE -%global NEO_ENABLE_XE_DRM_DETECTION FALSE +%global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE %global I915_HEADERS_DIR %{nil} %define gmmlib_sover 12 @@ -76,7 +76,7 @@ Intel(R) Graphics Compute Runtime for oneAPI Level Zero - development headers -DNEO_BUILD_WITH_OCL=FALSE \ -DNEO_SKIP_UNIT_TESTS=TRUE \ -DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \ - -DNEO_ENABLE_XE_DRM_DETECTION=%{NEO_ENABLE_XE_DRM_DETECTION} \ + -DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=%{NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \ -DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \ -DL0_INSTALL_UDEV_RULES=1 \ -DUDEV_RULES_DIR=/etc/udev/rules.d/ \ diff --git a/scripts/packaging/l0_gpu_driver/ubuntu_20.04/debian/rules b/scripts/packaging/l0_gpu_driver/ubuntu_20.04/debian/rules index 7325b621d9..50cc0773fb 100755 --- a/scripts/packaging/l0_gpu_driver/ubuntu_20.04/debian/rules +++ b/scripts/packaging/l0_gpu_driver/ubuntu_20.04/debian/rules @@ -9,7 +9,7 @@ RELEASE_WITH_REGKEYS ?= FALSE IGDRCL_FORCE_USE_LIBVA ?= FALSE NEO_SKIP_UNIT_TESTS ?= FALSE NEO_ENABLE_i915_PRELIM_DETECTION ?= TRUE -NEO_ENABLE_XE_DRM_DETECTION ?= FALSE +NEO_ENABLE_XE_EU_DEBUG_SUPPORT ?= FALSE NEO_FORCE_USE_AUB_STREAM ?= TRUE override_dh_auto_configure: @@ -18,7 +18,7 @@ override_dh_auto_configure: -DNEO_VERSION_BUILD=$(ver) \ -DNEO_SKIP_UNIT_TESTS=${NEO_SKIP_UNIT_TESTS} \ -DNEO_ENABLE_i915_PRELIM_DETECTION=${NEO_ENABLE_i915_PRELIM_DETECTION} \ - -DNEO_ENABLE_XE_DRM_DETECTION=${NEO_ENABLE_XE_DRM_DETECTION} \ + -DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=${NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \ -DNEO_DISABLE_BUILTINS_COMPILATION=${NEO_DISABLE_BUILTINS_COMPILATION} \ -DNEO_BUILD_WITH_OCL=FALSE \ -DRELEASE_WITH_REGKEYS=${RELEASE_WITH_REGKEYS} \ diff --git a/scripts/packaging/opencl/rhel_8/SPECS/opencl.spec b/scripts/packaging/opencl/rhel_8/SPECS/opencl.spec index cffdf1e875..4c7293f9de 100644 --- a/scripts/packaging/opencl/rhel_8/SPECS/opencl.spec +++ b/scripts/packaging/opencl/rhel_8/SPECS/opencl.spec @@ -5,7 +5,7 @@ %global NEO_OCL_VERSION_MINOR xxx %global NEO_OCL_VERSION_BUILD xxx %global NEO_RELEASE_WITH_REGKEYS FALSE -%global NEO_ENABLE_XE_DRM_DETECTION FALSE +%global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE %global I915_HEADERS_DIR %{nil} %define _source_payload w5T16.xzdio @@ -63,7 +63,7 @@ cd build -DBUILD_WITH_L0=FALSE \ -DNEO_SKIP_UNIT_TESTS=TRUE \ -DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \ - -DNEO_ENABLE_XE_DRM_DETECTION=%{NEO_ENABLE_XE_DRM_DETECTION} \ + -DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=%{NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \ -DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \ -DCMAKE_VERBOSE_MAKEFILE=FALSE \ -DI915_HEADERS_DIR=$(realpath %{I915_HEADERS_DIR}) diff --git a/scripts/packaging/opencl/sles_15/SPECS/opencl.spec b/scripts/packaging/opencl/sles_15/SPECS/opencl.spec index 2b770f79ab..89f2eaa013 100644 --- a/scripts/packaging/opencl/sles_15/SPECS/opencl.spec +++ b/scripts/packaging/opencl/sles_15/SPECS/opencl.spec @@ -7,7 +7,7 @@ %global NEO_OCL_VERSION_MINOR xxx %global NEO_OCL_VERSION_BUILD xxx %global NEO_RELEASE_WITH_REGKEYS FALSE -%global NEO_ENABLE_XE_DRM_DETECTION FALSE +%global NEO_ENABLE_XE_EU_DEBUG_SUPPORT FALSE %global I915_HEADERS_DIR %{nil} %define gmmlib_sover 12 @@ -71,7 +71,7 @@ Summary: ocloc package for opencl -DBUILD_WITH_L0=FALSE \ -DNEO_SKIP_UNIT_TESTS=TRUE \ -DNEO_ENABLE_i915_PRELIM_DETECTION=TRUE \ - -DNEO_ENABLE_XE_DRM_DETECTION=%{NEO_ENABLE_XE_DRM_DETECTION} \ + -DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=%{NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \ -DRELEASE_WITH_REGKEYS=%{NEO_RELEASE_WITH_REGKEYS} \ -DCMAKE_VERBOSE_MAKEFILE=FALSE \ -DI915_HEADERS_DIR=$(realpath %{I915_HEADERS_DIR}) diff --git a/scripts/packaging/opencl/ubuntu_20.04/debian/rules b/scripts/packaging/opencl/ubuntu_20.04/debian/rules index b34ec5bfcd..38cf1ffd88 100755 --- a/scripts/packaging/opencl/ubuntu_20.04/debian/rules +++ b/scripts/packaging/opencl/ubuntu_20.04/debian/rules @@ -8,7 +8,7 @@ RELEASE_WITH_REGKEYS ?= FALSE IGDRCL_FORCE_USE_LIBVA ?= FALSE NEO_SKIP_UNIT_TESTS ?= FALSE NEO_ENABLE_i915_PRELIM_DETECTION ?= TRUE -NEO_ENABLE_XE_DRM_DETECTION ?= FALSE +NEO_ENABLE_XE_EU_DEBUG_SUPPORT ?= FALSE NEO_FORCE_USE_AUB_STREAM ?= TRUE override_dh_auto_configure: @@ -20,7 +20,7 @@ override_dh_auto_configure: -DDO_NOT_RUN_AUB_TESTS=${DO_NOT_RUN_AUB_TESTS} \ -DNEO_SKIP_UNIT_TESTS=${NEO_SKIP_UNIT_TESTS} \ -DNEO_ENABLE_i915_PRELIM_DETECTION=${NEO_ENABLE_i915_PRELIM_DETECTION} \ - -DNEO_ENABLE_XE_DRM_DETECTION=${NEO_ENABLE_XE_DRM_DETECTION} \ + -DNEO_ENABLE_XE_EU_DEBUG_SUPPORT=${NEO_ENABLE_XE_EU_DEBUG_SUPPORT} \ -DNEO_DISABLE_BUILTINS_COMPILATION=${NEO_DISABLE_BUILTINS_COMPILATION} \ -DBUILD_WITH_L0=FALSE \ -DRELEASE_WITH_REGKEYS=${RELEASE_WITH_REGKEYS} \ diff --git a/shared/source/os_interface/linux/CMakeLists.txt b/shared/source/os_interface/linux/CMakeLists.txt index d75ccb5737..273d9d590f 100644 --- a/shared/source/os_interface/linux/CMakeLists.txt +++ b/shared/source/os_interface/linux/CMakeLists.txt @@ -40,7 +40,6 @@ set(NEO_CORE_OS_INTERFACE_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_operations_handler_default.h ${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_operations_handler_with_aub_dump.h ${CMAKE_CURRENT_SOURCE_DIR}/drm_memory_manager_create_multi_host_allocation.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/drm_version.cpp ${CMAKE_CURRENT_SOURCE_DIR}/drm_wrappers_checks.cpp ${CMAKE_CURRENT_SOURCE_DIR}/drm_wrappers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/drm_wrappers.h @@ -134,11 +133,5 @@ if("${BRANCH_TYPE}" STREQUAL "") endif() endif() -if(NEO_ENABLE_XE_DRM_DETECTION) - list(REMOVE_ITEM NEO_CORE_OS_INTERFACE_LINUX - ${CMAKE_CURRENT_SOURCE_DIR}/drm_version.cpp - ) -endif() - set_property(GLOBAL PROPERTY NEO_CORE_OS_INTERFACE_LINUX ${NEO_CORE_OS_INTERFACE_LINUX}) add_subdirectories() diff --git a/shared/source/os_interface/linux/drm_version.cpp b/shared/source/os_interface/linux/drm_version.cpp deleted file mode 100644 index cb5babb1d0..0000000000 --- a/shared/source/os_interface/linux/drm_version.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2022-2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/os_interface/linux/drm_neo.h" - -namespace NEO { -bool Drm::isDrmSupported(int fileDescriptor) { - auto drmVersion = Drm::getDrmVersion(fileDescriptor); - return "i915" == drmVersion; -} - -bool Drm::queryDeviceIdAndRevision() { - return queryI915DeviceIdAndRevision(); -} - -} // namespace NEO diff --git a/shared/source/os_interface/linux/xe/CMakeLists.txt b/shared/source/os_interface/linux/xe/CMakeLists.txt index d527155301..b5144a600d 100644 --- a/shared/source/os_interface/linux/xe/CMakeLists.txt +++ b/shared/source/os_interface/linux/xe/CMakeLists.txt @@ -4,17 +4,24 @@ # SPDX-License-Identifier: MIT # -if(NEO_ENABLE_XE_DRM_DETECTION) - set(NEO_CORE_OS_INTERFACE_LINUX_XE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/drm_version_xe.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_debugger.cpp - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}ioctl_helper_xe_string_value_getter.cpp - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}ioctl_helper_xe_vm_export.cpp - ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}ioctl_helper_xe_perf.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe.h - ) +set(NEO_CORE_OS_INTERFACE_LINUX_XE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/drm_version_xe.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe.cpp + ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}ioctl_helper_xe_string_value_getter.cpp + ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}ioctl_helper_xe_vm_export.cpp + ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}ioctl_helper_xe_perf.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe.h +) - set_property(GLOBAL APPEND PROPERTY NEO_CORE_OS_INTERFACE_LINUX ${NEO_CORE_OS_INTERFACE_LINUX_XE}) +if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT) + list(APPEND NEO_CORE_OS_INTERFACE_LINUX_XE + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_debugger.cpp + ) +else() + list(APPEND NEO_CORE_OS_INTERFACE_LINUX_XE + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_debugger_stubs.cpp + ) endif() + +set_property(GLOBAL APPEND PROPERTY NEO_CORE_OS_INTERFACE_LINUX ${NEO_CORE_OS_INTERFACE_LINUX_XE}) diff --git a/shared/source/os_interface/linux/xe/ioctl_helper_xe_debugger_stubs.cpp b/shared/source/os_interface/linux/xe/ioctl_helper_xe_debugger_stubs.cpp new file mode 100644 index 0000000000..cfbd8edddc --- /dev/null +++ b/shared/source/os_interface/linux/xe/ioctl_helper_xe_debugger_stubs.cpp @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2024 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "shared/source/os_interface/linux/xe/ioctl_helper_xe.h" + +namespace NEO { + +unsigned int IoctlHelperXe::getIoctlRequestValueDebugger(DrmIoctl ioctlRequest) const { + UNRECOVERABLE_IF(true); + return 0; +} + +int IoctlHelperXe::debuggerOpenIoctl(DrmIoctl request, void *arg) { + UNRECOVERABLE_IF(true); + return 0; +} + +int IoctlHelperXe::debuggerMetadataCreateIoctl(DrmIoctl request, void *arg) { + UNRECOVERABLE_IF(true); + return 0; +} + +int IoctlHelperXe::debuggerMetadataDestroyIoctl(DrmIoctl request, void *arg) { + UNRECOVERABLE_IF(true); + return 0; +} + +void *IoctlHelperXe::allocateDebugMetadata() { + UNRECOVERABLE_IF(true); + return nullptr; +} + +void *IoctlHelperXe::freeDebugMetadata(void *metadata) { + UNRECOVERABLE_IF(true); + return nullptr; +} + +void IoctlHelperXe::addDebugMetadataCookie(uint64_t cookie) { +} + +void IoctlHelperXe::addDebugMetadata(DrmResourceClass type, uint64_t *offset, uint64_t size) { +} + +int IoctlHelperXe::getRunaloneExtProperty() { + UNRECOVERABLE_IF(true); + return 0; +} + +int IoctlHelperXe::getEuDebugSysFsEnable() { + UNRECOVERABLE_IF(true); + return 0; +} + +uint32_t IoctlHelperXe::registerResource(DrmResourceClass classType, const void *data, size_t size) { + UNRECOVERABLE_IF(true); + return 0; +} + +void IoctlHelperXe::unregisterResource(uint32_t handle) { + UNRECOVERABLE_IF(true); +} + +std::unique_ptr IoctlHelperXe::prepareVmBindExt(const StackVec &bindExtHandles) { + return {}; +} + +} // namespace NEO diff --git a/shared/test/unit_test/os_interface/linux/xe/CMakeLists.txt b/shared/test/unit_test/os_interface/linux/xe/CMakeLists.txt index 2c909f2ee2..7ad1985195 100644 --- a/shared/test/unit_test/os_interface/linux/xe/CMakeLists.txt +++ b/shared/test/unit_test/os_interface/linux/xe/CMakeLists.txt @@ -4,20 +4,22 @@ # SPDX-License-Identifier: MIT # -if(NEO_ENABLE_XE_DRM_DETECTION) - set(NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE - ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt - ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_debugger_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_vm_export_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_perf_tests.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_tests.h +set(NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_vm_export_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_perf_tests.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_tests.h +) +if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT) + list(APPEND NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE + ${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe_debugger_tests.cpp ) - set_property(GLOBAL APPEND PROPERTY NEO_CORE_OS_INTERFACE_TESTS_LINUX ${NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE}) - - if(UNIX) - target_sources(neo_shared_tests PRIVATE ${NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE}) - endif() - - add_subdirectories() endif() +set_property(GLOBAL APPEND PROPERTY NEO_CORE_OS_INTERFACE_TESTS_LINUX ${NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE}) + +if(UNIX) + target_sources(neo_shared_tests PRIVATE ${NEO_CORE_OS_INTERFACE_TESTS_LINUX_XE}) +endif() + +add_subdirectories()