2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2024-03-22 23:23:06 +08:00
|
|
|
* Copyright (C) 2018-2024 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-06-07 00:26:42 +08:00
|
|
|
#include "shared/source/os_interface/linux/drm_wrappers.h"
|
|
|
|
|
2019-02-27 18:39:32 +08:00
|
|
|
#include <array>
|
2022-07-15 19:12:14 +08:00
|
|
|
#include <cstdint>
|
|
|
|
#include <cstdlib>
|
2019-02-27 18:39:32 +08:00
|
|
|
#include <cstring>
|
|
|
|
#include <dlfcn.h>
|
|
|
|
#include <fcntl.h>
|
2017-12-21 07:45:38 +08:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <sys/types.h>
|
2021-02-22 18:22:38 +08:00
|
|
|
#include <unistd.h>
|
2024-06-07 00:26:42 +08:00
|
|
|
#include <vector>
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2023-12-04 18:51:53 +08:00
|
|
|
extern int (*openFunc)(const char *pathname, int flags, ...);
|
2019-10-15 00:05:30 +08:00
|
|
|
extern int (*openFull)(const char *pathname, int flags, ...);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
extern int fakeFd;
|
|
|
|
extern int haveDri; // index of dri to serve, -1 - none
|
|
|
|
extern int deviceId; // known DeviceID
|
2022-06-07 23:03:52 +08:00
|
|
|
extern int revisionId;
|
2020-07-07 15:34:31 +08:00
|
|
|
extern int vmId;
|
2017-12-21 07:45:38 +08:00
|
|
|
extern int failOnDeviceId;
|
2019-10-18 16:15:09 +08:00
|
|
|
extern int failOnEuTotal;
|
|
|
|
extern int failOnSubsliceTotal;
|
2017-12-21 07:45:38 +08:00
|
|
|
extern int failOnRevisionId;
|
|
|
|
extern int failOnParamBoost;
|
|
|
|
extern int failOnContextCreate;
|
2020-07-07 15:34:31 +08:00
|
|
|
extern int failOnVirtualMemoryCreate;
|
2017-12-21 07:45:38 +08:00
|
|
|
extern int failOnSetPriority;
|
2019-03-22 13:21:52 +08:00
|
|
|
extern int failOnPreemption;
|
|
|
|
extern int havePreemption;
|
2017-12-21 07:45:38 +08:00
|
|
|
extern int failOnDrmVersion;
|
2024-06-07 00:26:42 +08:00
|
|
|
extern int captureVirtualMemoryCreate;
|
2017-12-21 07:45:38 +08:00
|
|
|
extern char providedDrmVersion[5];
|
|
|
|
extern int ioctlSeq[8];
|
|
|
|
extern size_t ioctlCnt;
|
2020-04-08 17:27:04 +08:00
|
|
|
extern bool failOnOpenDir;
|
2020-04-09 00:14:19 +08:00
|
|
|
extern uint32_t entryIndex;
|
2021-02-22 18:22:38 +08:00
|
|
|
extern int accessCalledTimes;
|
|
|
|
extern int readLinkCalledTimes;
|
2021-12-14 01:39:04 +08:00
|
|
|
extern int fstatCalledTimes;
|
2022-04-25 18:56:11 +08:00
|
|
|
extern bool forceExtraIoctlDuration;
|
2024-06-07 00:26:42 +08:00
|
|
|
extern std::vector<NEO::GemVmControl> capturedVmCreate;
|
2024-07-17 04:41:22 +08:00
|
|
|
extern int drmQuery(NEO::Query *param);
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
struct Query;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace DrmQueryConfig {
|
|
|
|
extern int failOnQueryEngineInfo;
|
|
|
|
extern int failOnQueryMemoryInfo;
|
|
|
|
extern unsigned int retrieveQueryMemoryInfoRegionCount;
|
|
|
|
} // namespace DrmQueryConfig
|