mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
move drm_mock to shared
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0e58821455
commit
0b4bc865d3
@@ -7,9 +7,9 @@
|
||||
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/helpers/gtest_helpers.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/helpers/gtest_helpers.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/helpers/gtest_helpers.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/helpers/gtest_helpers.h"
|
||||
#include "opencl/test/unit_test/helpers/hw_helper_tests.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/hw_info_config_linux_tests.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "opencl/test/unit_test/linux/mock_os_layer.h"
|
||||
#include "test.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -64,4 +64,4 @@ TEST(VaTests, givenVADeviceWhenGetDeviceFromVAIsCalledThenProperSyscallsAreUsed)
|
||||
EXPECT_EQ(accessCalledTimes, 1);
|
||||
EXPECT_EQ(readLinkCalledTimes, 1);
|
||||
EXPECT_EQ(fstatCalledTimes, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,8 +85,6 @@ else()
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/linux/mock_drm_allocation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/linux/mock_drm_command_stream_receiver.h
|
||||
${NEO_SHARED_DIRECTORY}/os_interface/linux/page_table_manager_functions.cpp
|
||||
${NEO_SOURCE_DIR}/opencl/test/unit_test/os_interface/linux/drm_mock.cpp
|
||||
${NEO_SOURCE_DIR}/opencl/test/unit_test/os_interface/linux/drm_mock.h
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "test.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/engine_descriptor_helper.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
|
||||
#include "opencl/test/unit_test/mocks/linux/mock_drm_allocation.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/device_command_stream_fixture.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "test.h"
|
||||
|
||||
#include "drm/i915_drm.h"
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/engine_info_impl.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/memory_info.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/ult_hw_config.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
#include "shared/test/common/mocks/mock_gfx_partition.h"
|
||||
#include "shared/test/common/test_macros/matchers.h"
|
||||
|
||||
@@ -41,7 +42,6 @@
|
||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_gmm.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock_cache_info.h"
|
||||
#include "test.h"
|
||||
|
||||
|
||||
@@ -1,348 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
const int DrmMock::mockFd;
|
||||
const uint32_t DrmMockResources::registerResourceReturnHandle = 3;
|
||||
|
||||
int DrmMock::ioctl(unsigned long request, void *arg) {
|
||||
ioctlCallsCount++;
|
||||
|
||||
if ((request == DRM_IOCTL_I915_GETPARAM) && (arg != nullptr)) {
|
||||
auto gp = static_cast<drm_i915_getparam_t *>(arg);
|
||||
if (gp->param == I915_PARAM_EU_TOTAL) {
|
||||
if (0 == this->storedRetValForEUVal) {
|
||||
*gp->value = this->storedEUVal;
|
||||
}
|
||||
return this->storedRetValForEUVal;
|
||||
}
|
||||
if (gp->param == I915_PARAM_SUBSLICE_TOTAL) {
|
||||
if (0 == this->storedRetValForSSVal) {
|
||||
*gp->value = this->storedSSVal;
|
||||
}
|
||||
return this->storedRetValForSSVal;
|
||||
}
|
||||
if (gp->param == I915_PARAM_CHIPSET_ID) {
|
||||
if (0 == this->storedRetValForDeviceID) {
|
||||
*gp->value = this->storedDeviceID;
|
||||
}
|
||||
return this->storedRetValForDeviceID;
|
||||
}
|
||||
if (gp->param == I915_PARAM_REVISION) {
|
||||
if (0 == this->storedRetValForDeviceRevID) {
|
||||
*gp->value = this->storedDeviceRevID;
|
||||
}
|
||||
return this->storedRetValForDeviceRevID;
|
||||
}
|
||||
if (gp->param == I915_PARAM_HAS_POOLED_EU) {
|
||||
if (0 == this->storedRetValForPooledEU) {
|
||||
*gp->value = this->storedHasPooledEU;
|
||||
}
|
||||
return this->storedRetValForPooledEU;
|
||||
}
|
||||
if (gp->param == I915_PARAM_MIN_EU_IN_POOL) {
|
||||
if (0 == this->storedRetValForMinEUinPool) {
|
||||
*gp->value = this->storedMinEUinPool;
|
||||
}
|
||||
return this->storedRetValForMinEUinPool;
|
||||
}
|
||||
if (gp->param == I915_PARAM_HAS_SCHEDULER) {
|
||||
*gp->value = this->storedPreemptionSupport;
|
||||
return this->storedRetVal;
|
||||
}
|
||||
if (gp->param == I915_PARAM_HAS_EXEC_SOFTPIN) {
|
||||
*gp->value = this->storedExecSoftPin;
|
||||
return this->storedRetVal;
|
||||
}
|
||||
if (gp->param == I915_PARAM_CS_TIMESTAMP_FREQUENCY) {
|
||||
*gp->value = this->storedCsTimestampFrequency;
|
||||
return this->storedRetVal;
|
||||
}
|
||||
}
|
||||
|
||||
if ((request == DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT) && (arg != nullptr)) {
|
||||
auto create = static_cast<drm_i915_gem_context_create_ext *>(arg);
|
||||
this->receivedCreateContextId = create->ctx_id;
|
||||
this->receivedContextCreateFlags = create->flags;
|
||||
return this->storedRetVal;
|
||||
}
|
||||
|
||||
if ((request == DRM_IOCTL_I915_GEM_CONTEXT_DESTROY) && (arg != nullptr)) {
|
||||
auto destroy = static_cast<drm_i915_gem_context_destroy *>(arg);
|
||||
this->receivedDestroyContextId = destroy->ctx_id;
|
||||
return this->storedRetVal;
|
||||
}
|
||||
|
||||
if ((request == DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM) && (arg != nullptr)) {
|
||||
receivedContextParamRequestCount++;
|
||||
receivedContextParamRequest = *static_cast<drm_i915_gem_context_param *>(arg);
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_PRIORITY) {
|
||||
return this->storedRetVal;
|
||||
}
|
||||
if ((receivedContextParamRequest.param == I915_CONTEXT_PRIVATE_PARAM_BOOST) && (receivedContextParamRequest.value == 1)) {
|
||||
return this->storedRetVal;
|
||||
}
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_SSEU) {
|
||||
if (storedRetValForSetSSEU == 0) {
|
||||
storedParamSseu = (*static_cast<drm_i915_gem_context_param_sseu *>(reinterpret_cast<void *>(receivedContextParamRequest.value))).slice_mask;
|
||||
}
|
||||
return this->storedRetValForSetSSEU;
|
||||
}
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_PERSISTENCE) {
|
||||
return this->storedRetValForPersistant;
|
||||
}
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_VM) {
|
||||
return this->storedRetVal;
|
||||
}
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_RECOVERABLE) {
|
||||
receivedRecoverableContextValue = receivedContextParamRequest.value;
|
||||
return this->storedRetVal;
|
||||
}
|
||||
}
|
||||
|
||||
if ((request == DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM) && (arg != nullptr)) {
|
||||
receivedContextParamRequestCount++;
|
||||
receivedContextParamRequest = *static_cast<drm_i915_gem_context_param *>(arg);
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_GTT_SIZE) {
|
||||
static_cast<drm_i915_gem_context_param *>(arg)->value = this->storedGTTSize;
|
||||
return this->storedRetValForGetGttSize;
|
||||
}
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_SSEU) {
|
||||
if (storedRetValForGetSSEU == 0) {
|
||||
(*static_cast<drm_i915_gem_context_param_sseu *>(reinterpret_cast<void *>(receivedContextParamRequest.value))).slice_mask = storedParamSseu;
|
||||
}
|
||||
return this->storedRetValForGetSSEU;
|
||||
}
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_PERSISTENCE) {
|
||||
static_cast<drm_i915_gem_context_param *>(arg)->value = this->storedPersistentContextsSupport;
|
||||
return this->storedRetValForPersistant;
|
||||
}
|
||||
|
||||
if (receivedContextParamRequest.param == I915_CONTEXT_PARAM_VM) {
|
||||
static_cast<drm_i915_gem_context_param *>(arg)->value = this->storedRetValForVmId;
|
||||
return 0u;
|
||||
}
|
||||
}
|
||||
|
||||
if (request == DRM_IOCTL_I915_GEM_EXECBUFFER2) {
|
||||
auto execbuf = static_cast<drm_i915_gem_execbuffer2 *>(arg);
|
||||
this->execBuffer = *execbuf;
|
||||
this->bbFlags = reinterpret_cast<drm_i915_gem_exec_object2 *>(execbuf->buffers_ptr)[execbuf->buffer_count - 1].flags;
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_I915_GEM_USERPTR) {
|
||||
auto userPtrParams = static_cast<drm_i915_gem_userptr *>(arg);
|
||||
userPtrParams->handle = returnHandle;
|
||||
returnHandle++;
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_I915_GEM_CREATE) {
|
||||
auto createParams = static_cast<drm_i915_gem_create *>(arg);
|
||||
this->createParamsSize = createParams->size;
|
||||
this->createParamsHandle = createParams->handle = 1u;
|
||||
if (0 == this->createParamsSize) {
|
||||
return EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_I915_GEM_SET_TILING) {
|
||||
auto setTilingParams = static_cast<drm_i915_gem_set_tiling *>(arg);
|
||||
setTilingMode = setTilingParams->tiling_mode;
|
||||
setTilingHandle = setTilingParams->handle;
|
||||
setTilingStride = setTilingParams->stride;
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_PRIME_FD_TO_HANDLE) {
|
||||
auto primeToHandleParams = static_cast<drm_prime_handle *>(arg);
|
||||
//return BO
|
||||
primeToHandleParams->handle = outputHandle;
|
||||
inputFd = primeToHandleParams->fd;
|
||||
return fdToHandleRetVal;
|
||||
}
|
||||
if (request == DRM_IOCTL_PRIME_HANDLE_TO_FD) {
|
||||
auto primeToFdParams = static_cast<drm_prime_handle *>(arg);
|
||||
primeToFdParams->fd = outputFd;
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_I915_GEM_GET_APERTURE) {
|
||||
auto aperture = static_cast<drm_i915_gem_get_aperture *>(arg);
|
||||
aperture->aper_available_size = gpuMemSize;
|
||||
aperture->aper_size = gpuMemSize;
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_I915_GEM_MMAP) {
|
||||
auto mmap_arg = static_cast<drm_i915_gem_mmap *>(arg);
|
||||
mmap_arg->addr_ptr = reinterpret_cast<__u64>(lockedPtr);
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_I915_GEM_WAIT) {
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_GEM_CLOSE) {
|
||||
return 0;
|
||||
}
|
||||
if (request == DRM_IOCTL_I915_QUERY && arg != nullptr) {
|
||||
auto queryArg = static_cast<drm_i915_query *>(arg);
|
||||
auto queryItemArg = reinterpret_cast<drm_i915_query_item *>(queryArg->items_ptr);
|
||||
storedQueryItem = *queryItemArg;
|
||||
|
||||
auto realEuCount = rootDeviceEnvironment.getHardwareInfo()->gtSystemInfo.EUCount;
|
||||
auto dataSize = static_cast<size_t>(std::ceil(realEuCount / 8.0));
|
||||
|
||||
if (queryItemArg->length == 0) {
|
||||
if (queryItemArg->query_id == DRM_I915_QUERY_TOPOLOGY_INFO) {
|
||||
queryItemArg->length = static_cast<int32_t>(sizeof(drm_i915_query_topology_info) + dataSize);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (queryItemArg->query_id == DRM_I915_QUERY_TOPOLOGY_INFO) {
|
||||
auto topologyArg = reinterpret_cast<drm_i915_query_topology_info *>(queryItemArg->data_ptr);
|
||||
if (this->failRetTopology) {
|
||||
return -1;
|
||||
}
|
||||
topologyArg->max_slices = this->storedSVal;
|
||||
topologyArg->max_subslices = this->storedSVal ? (this->storedSSVal / this->storedSVal) : 0;
|
||||
topologyArg->max_eus_per_subslice = this->storedSSVal ? (this->storedEUVal / this->storedSSVal) : 0;
|
||||
|
||||
if (this->disableSomeTopology) {
|
||||
memset(topologyArg->data, 0xCA, dataSize);
|
||||
} else {
|
||||
memset(topologyArg->data, 0xFF, dataSize);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return handleRemainingRequests(request, arg);
|
||||
}
|
||||
|
||||
int DrmMockEngine::handleRemainingRequests(unsigned long request, void *arg) {
|
||||
if ((request == DRM_IOCTL_I915_QUERY) && (arg != nullptr)) {
|
||||
if (i915QuerySuccessCount == 0) {
|
||||
return EINVAL;
|
||||
}
|
||||
i915QuerySuccessCount--;
|
||||
auto query = static_cast<drm_i915_query *>(arg);
|
||||
if (query->items_ptr == 0) {
|
||||
return EINVAL;
|
||||
}
|
||||
for (auto i = 0u; i < query->num_items; i++) {
|
||||
handleQueryItem(reinterpret_cast<drm_i915_query_item *>(query->items_ptr) + i);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void DrmMockEngine::handleQueryItem(drm_i915_query_item *queryItem) {
|
||||
switch (queryItem->query_id) {
|
||||
case DRM_I915_QUERY_ENGINE_INFO:
|
||||
if (queryEngineInfoSuccessCount == 0) {
|
||||
queryItem->length = -EINVAL;
|
||||
} else {
|
||||
queryEngineInfoSuccessCount--;
|
||||
auto numberOfEngines = 2u;
|
||||
int engineInfoSize = sizeof(drm_i915_query_engine_info) + numberOfEngines * sizeof(drm_i915_engine_info);
|
||||
if (queryItem->length == 0) {
|
||||
queryItem->length = engineInfoSize;
|
||||
} else {
|
||||
EXPECT_EQ(engineInfoSize, queryItem->length);
|
||||
auto queryEnginenInfo = reinterpret_cast<drm_i915_query_engine_info *>(queryItem->data_ptr);
|
||||
EXPECT_EQ(0u, queryEnginenInfo->num_engines);
|
||||
queryEnginenInfo->num_engines = numberOfEngines;
|
||||
queryEnginenInfo->engines[0].engine.engine_class = I915_ENGINE_CLASS_RENDER;
|
||||
queryEnginenInfo->engines[0].engine.engine_instance = 1;
|
||||
queryEnginenInfo->engines[1].engine.engine_class = I915_ENGINE_CLASS_COPY;
|
||||
queryEnginenInfo->engines[1].engine.engine_instance = 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
std::map<unsigned long, const char *> ioctlCodeStringMap = {
|
||||
{DRM_IOCTL_I915_INIT, "DRM_IOCTL_I915_INIT"},
|
||||
{DRM_IOCTL_I915_FLUSH, "DRM_IOCTL_I915_FLUSH"},
|
||||
{DRM_IOCTL_I915_FLIP, "DRM_IOCTL_I915_FLIP"},
|
||||
{DRM_IOCTL_GEM_CLOSE, "DRM_IOCTL_GEM_CLOSE"},
|
||||
{DRM_IOCTL_I915_BATCHBUFFER, "DRM_IOCTL_I915_BATCHBUFFER"},
|
||||
{DRM_IOCTL_I915_IRQ_EMIT, "DRM_IOCTL_I915_IRQ_EMIT"},
|
||||
{DRM_IOCTL_I915_IRQ_WAIT, "DRM_IOCTL_I915_IRQ_WAIT"},
|
||||
{DRM_IOCTL_I915_GETPARAM, "DRM_IOCTL_I915_GETPARAM"},
|
||||
{DRM_IOCTL_I915_SETPARAM, "DRM_IOCTL_I915_SETPARAM"},
|
||||
{DRM_IOCTL_I915_ALLOC, "DRM_IOCTL_I915_ALLOC"},
|
||||
{DRM_IOCTL_I915_FREE, "DRM_IOCTL_I915_FREE"},
|
||||
{DRM_IOCTL_I915_INIT_HEAP, "DRM_IOCTL_I915_INIT_HEAP"},
|
||||
{DRM_IOCTL_I915_CMDBUFFER, "DRM_IOCTL_I915_CMDBUFFER"},
|
||||
{DRM_IOCTL_I915_DESTROY_HEAP, "DRM_IOCTL_I915_DESTROY_HEAP"},
|
||||
{DRM_IOCTL_I915_SET_VBLANK_PIPE, "DRM_IOCTL_I915_SET_VBLANK_PIPE"},
|
||||
{DRM_IOCTL_I915_GET_VBLANK_PIPE, "DRM_IOCTL_I915_GET_VBLANK_PIPE"},
|
||||
{DRM_IOCTL_I915_VBLANK_SWAP, "DRM_IOCTL_I915_VBLANK_SWAP"},
|
||||
{DRM_IOCTL_I915_HWS_ADDR, "DRM_IOCTL_I915_HWS_ADDR"},
|
||||
{DRM_IOCTL_I915_GEM_INIT, "DRM_IOCTL_I915_GEM_INIT"},
|
||||
{DRM_IOCTL_I915_GEM_EXECBUFFER, "DRM_IOCTL_I915_GEM_EXECBUFFER"},
|
||||
{DRM_IOCTL_I915_GEM_EXECBUFFER2, "DRM_IOCTL_I915_GEM_EXECBUFFER2"},
|
||||
{DRM_IOCTL_I915_GEM_EXECBUFFER2_WR, "DRM_IOCTL_I915_GEM_EXECBUFFER2_WR"},
|
||||
{DRM_IOCTL_I915_GEM_PIN, "DRM_IOCTL_I915_GEM_PIN"},
|
||||
{DRM_IOCTL_I915_GEM_UNPIN, "DRM_IOCTL_I915_GEM_UNPIN"},
|
||||
{DRM_IOCTL_I915_GEM_BUSY, "DRM_IOCTL_I915_GEM_BUSY"},
|
||||
{DRM_IOCTL_I915_GEM_SET_CACHING, "DRM_IOCTL_I915_GEM_SET_CACHING"},
|
||||
{DRM_IOCTL_I915_GEM_GET_CACHING, "DRM_IOCTL_I915_GEM_GET_CACHING"},
|
||||
{DRM_IOCTL_I915_GEM_THROTTLE, "DRM_IOCTL_I915_GEM_THROTTLE"},
|
||||
{DRM_IOCTL_I915_GEM_ENTERVT, "DRM_IOCTL_I915_GEM_ENTERVT"},
|
||||
{DRM_IOCTL_I915_GEM_LEAVEVT, "DRM_IOCTL_I915_GEM_LEAVEVT"},
|
||||
{DRM_IOCTL_I915_GEM_CREATE, "DRM_IOCTL_I915_GEM_CREATE"},
|
||||
{DRM_IOCTL_I915_GEM_PREAD, "DRM_IOCTL_I915_GEM_PREAD"},
|
||||
{DRM_IOCTL_I915_GEM_PWRITE, "DRM_IOCTL_I915_GEM_PWRITE"},
|
||||
{DRM_IOCTL_I915_GEM_SET_DOMAIN, "DRM_IOCTL_I915_GEM_SET_DOMAIN"},
|
||||
{DRM_IOCTL_I915_GEM_SW_FINISH, "DRM_IOCTL_I915_GEM_SW_FINISH"},
|
||||
{DRM_IOCTL_I915_GEM_SET_TILING, "DRM_IOCTL_I915_GEM_SET_TILING"},
|
||||
{DRM_IOCTL_I915_GEM_GET_TILING, "DRM_IOCTL_I915_GEM_GET_TILING"},
|
||||
{DRM_IOCTL_I915_GEM_GET_APERTURE, "DRM_IOCTL_I915_GEM_GET_APERTURE"},
|
||||
{DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID, "DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID"},
|
||||
{DRM_IOCTL_I915_GEM_MADVISE, "DRM_IOCTL_I915_GEM_MADVISE"},
|
||||
{DRM_IOCTL_I915_OVERLAY_PUT_IMAGE, "DRM_IOCTL_I915_OVERLAY_PUT_IMAGE"},
|
||||
{DRM_IOCTL_I915_OVERLAY_ATTRS, "DRM_IOCTL_I915_OVERLAY_ATTRS"},
|
||||
{DRM_IOCTL_I915_SET_SPRITE_COLORKEY, "DRM_IOCTL_I915_SET_SPRITE_COLORKEY"},
|
||||
{DRM_IOCTL_I915_GET_SPRITE_COLORKEY, "DRM_IOCTL_I915_GET_SPRITE_COLORKEY"},
|
||||
{DRM_IOCTL_I915_GEM_WAIT, "DRM_IOCTL_I915_GEM_WAIT"},
|
||||
{DRM_IOCTL_I915_GEM_CONTEXT_CREATE, "DRM_IOCTL_I915_GEM_CONTEXT_CREATE"},
|
||||
{DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, "DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT"},
|
||||
{DRM_IOCTL_I915_GEM_CONTEXT_DESTROY, "DRM_IOCTL_I915_GEM_CONTEXT_DESTROY"},
|
||||
{DRM_IOCTL_I915_REG_READ, "DRM_IOCTL_I915_REG_READ"},
|
||||
{DRM_IOCTL_I915_GET_RESET_STATS, "DRM_IOCTL_I915_GET_RESET_STATS"},
|
||||
{DRM_IOCTL_I915_GEM_USERPTR, "DRM_IOCTL_I915_GEM_USERPTR"},
|
||||
{DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM, "DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM"},
|
||||
{DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, "DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM"},
|
||||
{DRM_IOCTL_I915_PERF_OPEN, "DRM_IOCTL_I915_PERF_OPEN"},
|
||||
{DRM_IOCTL_I915_PERF_ADD_CONFIG, "DRM_IOCTL_I915_PERF_ADD_CONFIG"},
|
||||
{DRM_IOCTL_I915_PERF_REMOVE_CONFIG, "DRM_IOCTL_I915_PERF_REMOVE_CONFIG"},
|
||||
{DRM_IOCTL_I915_QUERY, "DRM_IOCTL_I915_QUERY"},
|
||||
{DRM_IOCTL_I915_GEM_MMAP, "DRM_IOCTL_I915_GEM_MMAP"},
|
||||
{DRM_IOCTL_PRIME_FD_TO_HANDLE, "DRM_IOCTL_PRIME_FD_TO_HANDLE"},
|
||||
{DRM_IOCTL_PRIME_HANDLE_TO_FD, "DRM_IOCTL_PRIME_HANDLE_TO_FD"},
|
||||
{static_cast<unsigned long>(101010101), "101010101"}};
|
||||
|
||||
std::map<int, const char *> ioctlParamCodeStringMap = {
|
||||
{I915_PARAM_CHIPSET_ID, "I915_PARAM_CHIPSET_ID"},
|
||||
{I915_PARAM_REVISION, "I915_PARAM_REVISION"},
|
||||
{I915_PARAM_HAS_EXEC_SOFTPIN, "I915_PARAM_HAS_EXEC_SOFTPIN"},
|
||||
{I915_PARAM_HAS_POOLED_EU, "I915_PARAM_HAS_POOLED_EU"},
|
||||
{I915_PARAM_HAS_SCHEDULER, "I915_PARAM_HAS_SCHEDULER"},
|
||||
{I915_PARAM_EU_TOTAL, "I915_PARAM_EU_TOTAL"},
|
||||
{I915_PARAM_SUBSLICE_TOTAL, "I915_PARAM_SUBSLICE_TOTAL"},
|
||||
{I915_PARAM_MIN_EU_IN_POOL, "I915_PARAM_MIN_EU_IN_POOL"},
|
||||
{I915_PARAM_CS_TIMESTAMP_FREQUENCY, "I915_PARAM_CS_TIMESTAMP_FREQUENCY"},
|
||||
{static_cast<int>(101010101), "101010101"}};
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
|
||||
#include "opencl/source/platform/platform.h"
|
||||
#include "opencl/test/unit_test/linux/mock_os_layer.h"
|
||||
|
||||
#include "drm/i915_drm.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
#include <limits.h>
|
||||
#include <map>
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
// Mock DRM class that responds to DRM_IOCTL_I915_GETPARAMs
|
||||
class DrmMock : public Drm {
|
||||
public:
|
||||
using Drm::bindAvailable;
|
||||
using Drm::cacheInfo;
|
||||
using Drm::checkQueueSliceSupport;
|
||||
using Drm::classHandles;
|
||||
using Drm::contextDebugSupported;
|
||||
using Drm::engineInfo;
|
||||
using Drm::generateElfUUID;
|
||||
using Drm::generateUUID;
|
||||
using Drm::getQueueSliceCount;
|
||||
using Drm::memoryInfo;
|
||||
using Drm::nonPersistentContextsSupported;
|
||||
using Drm::preemptionSupported;
|
||||
using Drm::query;
|
||||
using Drm::requirePerContextVM;
|
||||
using Drm::sliceCountChangeSupported;
|
||||
using Drm::systemInfo;
|
||||
using Drm::translateTopologyInfo;
|
||||
using Drm::virtualMemoryIds;
|
||||
|
||||
DrmMock(int fd, RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std::make_unique<HwDeviceIdDrm>(fd, ""), rootDeviceEnvironment) {
|
||||
sliceCountChangeSupported = true;
|
||||
|
||||
if (rootDeviceEnvironment.executionEnvironment.isDebuggingEnabled()) {
|
||||
setPerContextVMRequired(true);
|
||||
}
|
||||
|
||||
if (!isPerContextVMRequired()) {
|
||||
createVirtualMemoryAddressSpace(HwHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()));
|
||||
}
|
||||
}
|
||||
DrmMock(RootDeviceEnvironment &rootDeviceEnvironment) : DrmMock(mockFd, rootDeviceEnvironment) {}
|
||||
|
||||
int ioctl(unsigned long request, void *arg) override;
|
||||
int getErrno() override {
|
||||
if (baseErrno) {
|
||||
return Drm::getErrno();
|
||||
}
|
||||
return errnoRetVal;
|
||||
}
|
||||
|
||||
void writeConfigFile(const char *name, int deviceID) {
|
||||
std::ofstream tempfile(name, std::ios::binary);
|
||||
if (tempfile.is_open()) {
|
||||
PCIConfig config;
|
||||
config.DeviceID = deviceID;
|
||||
tempfile.write(reinterpret_cast<char *>(&config), sizeof(config));
|
||||
tempfile.close();
|
||||
}
|
||||
}
|
||||
|
||||
void deleteConfigFile(const char *name) {
|
||||
std::ofstream tempfile(name);
|
||||
if (tempfile.is_open()) {
|
||||
tempfile.close();
|
||||
remove(name);
|
||||
}
|
||||
}
|
||||
|
||||
void setFileDescriptor(int fd) {
|
||||
hwDeviceId = std::make_unique<HwDeviceIdDrm>(fd, "");
|
||||
}
|
||||
|
||||
void setPciPath(const char *pciPath) {
|
||||
hwDeviceId = std::make_unique<HwDeviceIdDrm>(getFileDescriptor(), pciPath);
|
||||
}
|
||||
|
||||
void setDeviceID(int deviceId) { this->deviceId = deviceId; }
|
||||
void setDeviceRevID(int revisionId) { this->revisionId = revisionId; }
|
||||
void setBindAvailable() {
|
||||
this->bindAvailable = true;
|
||||
}
|
||||
void setContextDebugFlag(uint32_t drmContextId) override {
|
||||
passedContextDebugId = drmContextId;
|
||||
return Drm::setContextDebugFlag(drmContextId);
|
||||
}
|
||||
|
||||
bool isDebugAttachAvailable() override {
|
||||
if (allowDebugAttachCallBase) {
|
||||
return Drm::isDebugAttachAvailable();
|
||||
}
|
||||
return allowDebugAttach;
|
||||
}
|
||||
|
||||
static const int mockFd = 33;
|
||||
|
||||
bool failRetTopology = false;
|
||||
bool baseErrno = true;
|
||||
int errnoRetVal = 0;
|
||||
int storedEUVal = 8;
|
||||
int storedSSVal = 2;
|
||||
int storedSVal = 1;
|
||||
int storedDeviceID = 1;
|
||||
int storedDeviceRevID = 1;
|
||||
int storedHasPooledEU = 1;
|
||||
int storedMinEUinPool = 1;
|
||||
int storedPersistentContextsSupport = 1;
|
||||
int storedRetVal = 0;
|
||||
int storedRetValForGetGttSize = 0;
|
||||
int storedRetValForGetSSEU = 0;
|
||||
int storedRetValForSetSSEU = 0;
|
||||
int storedRetValForDeviceID = 0;
|
||||
int storedRetValForEUVal = 0;
|
||||
int storedRetValForSSVal = 0;
|
||||
int storedRetValForDeviceRevID = 0;
|
||||
int storedRetValForPooledEU = 0;
|
||||
int storedRetValForMinEUinPool = 0;
|
||||
int storedRetValForPersistant = 0;
|
||||
int storedPreemptionSupport =
|
||||
I915_SCHEDULER_CAP_ENABLED |
|
||||
I915_SCHEDULER_CAP_PRIORITY |
|
||||
I915_SCHEDULER_CAP_PREEMPTION;
|
||||
int storedExecSoftPin = 0;
|
||||
int storedRetValForVmId = 1;
|
||||
int storedCsTimestampFrequency = 1000;
|
||||
|
||||
bool disableSomeTopology = false;
|
||||
bool allowDebugAttach = false;
|
||||
bool allowDebugAttachCallBase = false;
|
||||
uint32_t passedContextDebugId = std::numeric_limits<uint32_t>::max();
|
||||
|
||||
uint32_t receivedContextCreateFlags = 0;
|
||||
uint32_t receivedCreateContextId = 0;
|
||||
uint32_t receivedDestroyContextId = 0;
|
||||
uint32_t ioctlCallsCount = 0;
|
||||
|
||||
uint32_t receivedContextParamRequestCount = 0;
|
||||
drm_i915_gem_context_param receivedContextParamRequest = {};
|
||||
uint64_t receivedRecoverableContextValue = std::numeric_limits<uint64_t>::max();
|
||||
|
||||
//DRM_IOCTL_I915_GEM_EXECBUFFER2
|
||||
drm_i915_gem_execbuffer2 execBuffer = {0};
|
||||
uint64_t bbFlags;
|
||||
|
||||
//DRM_IOCTL_I915_GEM_CREATE
|
||||
__u64 createParamsSize = 0;
|
||||
__u32 createParamsHandle = 0;
|
||||
//DRM_IOCTL_I915_GEM_SET_TILING
|
||||
__u32 setTilingMode = 0;
|
||||
__u32 setTilingHandle = 0;
|
||||
__u32 setTilingStride = 0;
|
||||
//DRM_IOCTL_PRIME_FD_TO_HANDLE
|
||||
__u32 outputHandle = 0;
|
||||
__s32 inputFd = 0;
|
||||
int fdToHandleRetVal = 0;
|
||||
//DRM_IOCTL_HANDLE_TO_FD
|
||||
__s32 outputFd = 0;
|
||||
//DRM_IOCTL_I915_GEM_USERPTR
|
||||
__u32 returnHandle = 0;
|
||||
__u64 gpuMemSize = 3u * MemoryConstants::gigaByte;
|
||||
//DRM_IOCTL_I915_GEM_MMAP
|
||||
uint64_t lockedPtr[4];
|
||||
//DRM_IOCTL_I915_QUERY
|
||||
drm_i915_query_item storedQueryItem = {};
|
||||
|
||||
uint64_t storedGTTSize = 1ull << 47;
|
||||
uint64_t storedParamSseu = ULONG_MAX;
|
||||
|
||||
virtual int handleRemainingRequests(unsigned long request, void *arg) { return -1; }
|
||||
};
|
||||
|
||||
class DrmMockNonFailing : public DrmMock {
|
||||
public:
|
||||
using DrmMock::DrmMock;
|
||||
int handleRemainingRequests(unsigned long request, void *arg) override { return 0; }
|
||||
};
|
||||
|
||||
class DrmMockEngine : public DrmMock {
|
||||
public:
|
||||
uint32_t i915QuerySuccessCount = std::numeric_limits<uint32_t>::max();
|
||||
uint32_t queryEngineInfoSuccessCount = std::numeric_limits<uint32_t>::max();
|
||||
|
||||
DrmMockEngine(RootDeviceEnvironment &rootDeviceEnvironment) : DrmMock(rootDeviceEnvironment) {}
|
||||
|
||||
int handleRemainingRequests(unsigned long request, void *arg) override;
|
||||
|
||||
void handleQueryItem(drm_i915_query_item *queryItem);
|
||||
};
|
||||
|
||||
class DrmMockResources : public DrmMock {
|
||||
public:
|
||||
DrmMockResources(RootDeviceEnvironment &rootDeviceEnvironment) : DrmMock(mockFd, rootDeviceEnvironment) {
|
||||
setBindAvailable();
|
||||
}
|
||||
|
||||
bool registerResourceClasses() override {
|
||||
registerClassesCalled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t registerResource(ResourceClass classType, const void *data, size_t size) override {
|
||||
registeredClass = classType;
|
||||
memcpy_s(registeredData, sizeof(registeredData), data, size);
|
||||
registeredDataSize = size;
|
||||
return registerResourceReturnHandle;
|
||||
}
|
||||
|
||||
void unregisterResource(uint32_t handle) override {
|
||||
unregisterCalledCount++;
|
||||
unregisteredHandle = handle;
|
||||
}
|
||||
|
||||
uint32_t registerIsaCookie(uint32_t isaHanlde) override {
|
||||
return currentCookie++;
|
||||
}
|
||||
|
||||
bool isVmBindAvailable() override {
|
||||
return bindAvailable;
|
||||
}
|
||||
|
||||
static const uint32_t registerResourceReturnHandle;
|
||||
|
||||
uint32_t unregisteredHandle = 0;
|
||||
uint32_t unregisterCalledCount = 0;
|
||||
ResourceClass registeredClass = ResourceClass::MaxSize;
|
||||
bool registerClassesCalled = false;
|
||||
uint64_t registeredData[128];
|
||||
size_t registeredDataSize;
|
||||
uint32_t currentCookie = 2;
|
||||
};
|
||||
|
||||
extern std::map<unsigned long, const char *> ioctlCodeStringMap;
|
||||
extern std::map<int, const char *> ioctlParamCodeStringMap;
|
||||
@@ -8,8 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "drm/i915_drm.h"
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#include "shared/source/os_interface/linux/system_info_impl.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/helpers/gtest_helpers.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/helpers/engine_descriptor_helper.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/memory_management_fixture.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/mocks/linux/mock_drm_allocation.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "opencl/test/unit_test/utilities/file_logger_tests.h"
|
||||
#include "test.h"
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/utilities/cpu_info.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/hw_info_config_tests.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
#include "shared/source/os_interface/linux/drm_memory_operations_handler.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
#include "shared/test/common/mocks/linux/mock_drm_memory_manager.h"
|
||||
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/test/unit_test/fixtures/ult_command_stream_receiver_fixture.h"
|
||||
#include "opencl/test/unit_test/mocks/linux/mock_drm_command_stream_receiver.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
|
||||
#include "mock_performance_counters_linux.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/mock_os_time_linux.h"
|
||||
#include "opencl/test/unit_test/os_interface/mock_performance_counters.h"
|
||||
|
||||
|
||||
@@ -10,10 +10,9 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/linux/os_context_linux.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "shared/test/common/helpers/ult_hw_config.h"
|
||||
#include "shared/test/common/helpers/variable_backup.h"
|
||||
#include "shared/test/common/libult/create_command_stream.h"
|
||||
#include "shared/test/common/libult/linux/drm_mock.h"
|
||||
|
||||
#include "opencl/source/api/api.h"
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
@@ -28,7 +29,6 @@
|
||||
#include "opencl/test/unit_test/mocks/mock_command_queue.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
||||
#include "opencl/test/unit_test/os_interface/linux/drm_mock.h"
|
||||
#include "opencl/test/unit_test/sharings/va/mock_va_sharing.h"
|
||||
#include "test.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user