mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add a method to check drm support
Related-To: NEO-6999 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fb40e8d1a6
commit
3ac5853e8d
@@ -44,6 +44,7 @@ uint32_t pwriteFuncCalled = 0u;
|
||||
uint32_t mmapFuncCalled = 0u;
|
||||
uint32_t munmapFuncCalled = 0u;
|
||||
bool isInvalidAILTest = false;
|
||||
const char *drmVersion = "i915";
|
||||
|
||||
int (*sysCallsOpen)(const char *pathname, int flags) = nullptr;
|
||||
ssize_t (*sysCallsPread)(int fd, void *buf, size_t count, off_t offset) = nullptr;
|
||||
@@ -89,7 +90,7 @@ int ioctl(int fileDescriptor, unsigned long int request, void *arg) {
|
||||
if (fileDescriptor == fakeFileDescriptor) {
|
||||
if (request == DRM_IOCTL_VERSION) {
|
||||
auto pVersion = static_cast<drm_version_t *>(arg);
|
||||
snprintf(pVersion->name, pVersion->name_len, "i915");
|
||||
memcpy_s(pVersion->name, pVersion->name_len, drmVersion, strlen(drmVersion) + 1);
|
||||
}
|
||||
}
|
||||
if (request == DRM_IOCTL_I915_GEM_VM_CREATE) {
|
||||
|
||||
@@ -20,5 +20,6 @@ extern int (*sysCallsIoctl)(int fileDescriptor, unsigned long int request, void
|
||||
extern int (*sysCallsPoll)(struct pollfd *pollFd, unsigned long int numberOfFds, int timeout);
|
||||
extern ssize_t (*sysCallsRead)(int fd, void *buf, size_t count);
|
||||
|
||||
extern const char *drmVersion;
|
||||
} // namespace SysCalls
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user