2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2021-02-22 18:22:38 +08:00
|
|
|
* Copyright (C) 2017-2021 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
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/os_interface/linux/drm_neo.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
#include "drm/i915_drm.h"
|
|
|
|
|
2019-02-27 18:39:32 +08:00
|
|
|
#include <array>
|
|
|
|
#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>
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
extern int (*c_open)(const char *pathname, int flags, ...);
|
2019-10-15 00:05:30 +08:00
|
|
|
extern int (*openFull)(const char *pathname, int flags, ...);
|
2020-03-12 14:54:21 +08:00
|
|
|
extern int (*c_ioctl)(int fd, unsigned long int request, ...);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2020-06-09 21:51:26 +08:00
|
|
|
extern int drmOtherRequests(unsigned long int request, ...);
|
2019-10-24 21:52:07 +08:00
|
|
|
|
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
|
|
|
|
extern int haveSoftPin;
|
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 failOnSoftPin;
|
|
|
|
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;
|
|
|
|
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;
|
|
|
|
extern int fstatCalledTimes;
|