mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
Reclassified drm functions to generate warnings only
Related-To: NEO-3008 Change-Id: I0fecb010bbfb29442caba9f2e31a7e05bbd16189 Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
2f343b7711
commit
4a74bda894
@@ -198,16 +198,14 @@ Drm *Drm::create(int32_t deviceOrdinal) {
|
||||
drmObject->queryEngineInfo();
|
||||
ret = drmObject->setEngines();
|
||||
if (ret != 0) {
|
||||
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "FATAL: Failed to set engines\n");
|
||||
return nullptr;
|
||||
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Failed to set engines\n");
|
||||
}
|
||||
|
||||
if (HwHelper::get(device->pHwInfo->platform.eRenderCoreFamily).getEnableLocalMemory(*device->pHwInfo)) {
|
||||
drmObject->queryMemoryInfo();
|
||||
ret = drmObject->setMemoryRegions();
|
||||
if (ret != 0) {
|
||||
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "FATAL: Failed to set memory regions\n");
|
||||
return nullptr;
|
||||
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "WARNING: Failed to set memory regions\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ set(IGDRCL_SRCS_linux_dll_tests
|
||||
${NEO_SOURCE_DIR}/runtime/dll/linux/options.cpp
|
||||
${NEO_SOURCE_DIR}/runtime/dll/linux/os_interface.cpp
|
||||
${NEO_SOURCE_DIR}/unit_tests/aub_stream_mocks/aub_stream_interface_mock.cpp
|
||||
${NEO_SOURCE_DIR}/unit_tests/linux${BRANCH_DIR_SUFFIX}/drm_other_requests.cpp
|
||||
${NEO_SOURCE_DIR}/unit_tests/os_interface/linux/create_drm_memory_manager.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_mode.h
|
||||
)
|
||||
@@ -61,3 +62,4 @@ foreach(target_name linux_tests linux_dll_tests)
|
||||
)
|
||||
add_dependencies(unit_tests igdrcl_${target_name})
|
||||
endforeach()
|
||||
add_subdirectories()
|
||||
10
unit_tests/linux/drm_other_requests.cpp
Normal file
10
unit_tests/linux/drm_other_requests.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
int drmOtherRequests(unsigned long int request, va_list vl) { return 0; }
|
||||
@@ -184,6 +184,9 @@ int ioctl(int fd, unsigned long int request, ...) throw() {
|
||||
case DRM_IOCTL_VERSION:
|
||||
res = drmVersion(va_arg(vl, drm_version_t *));
|
||||
break;
|
||||
default:
|
||||
res = drmOtherRequests(request, vl);
|
||||
break;
|
||||
}
|
||||
}
|
||||
va_end(vl);
|
||||
|
||||
@@ -27,6 +27,8 @@ extern int (*c_open)(const char *pathname, int flags, ...);
|
||||
extern int (*openFull)(const char *pathname, int flags, ...);
|
||||
extern int (*c_ioctl)(int __fd, unsigned long int __request, ...);
|
||||
|
||||
extern int drmOtherRequests(unsigned long int request, va_list vl);
|
||||
|
||||
extern int fakeFd;
|
||||
extern int haveDri; // index of dri to serve, -1 - none
|
||||
extern int deviceId; // known DeviceID
|
||||
|
||||
Reference in New Issue
Block a user