mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 10:26:29 +08:00
Create wrappers for different version of i915 headers
Related-To: NEO-6852 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
56a264a33d
commit
78c96db2fa
@@ -11,12 +11,11 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/i915.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/mocks/linux/mock_drm_wrappers.h"
|
||||
#include "shared/test/common/os_interface/linux/device_command_stream_fixture.h"
|
||||
|
||||
#include "drm/i915_drm.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
#include <limits.h>
|
||||
@@ -56,25 +55,10 @@ class DrmMock : public Drm {
|
||||
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);
|
||||
}
|
||||
|
||||
setupIoctlHelper(rootDeviceEnvironment.getHardwareInfo()->platform.eProductFamily);
|
||||
if (!isPerContextVMRequired()) {
|
||||
createVirtualMemoryAddressSpace(HwHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()));
|
||||
}
|
||||
}
|
||||
DrmMock(int fd, RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
DrmMock(RootDeviceEnvironment &rootDeviceEnvironment) : DrmMock(mockFd, rootDeviceEnvironment) {}
|
||||
|
||||
~DrmMock() override {
|
||||
if (expectIoctlCallsOnDestruction) {
|
||||
EXPECT_EQ(expectedIoctlCallsOnDestruction, ioctlCallsCount);
|
||||
}
|
||||
}
|
||||
~DrmMock() override;
|
||||
|
||||
int ioctl(DrmIoctl request, void *arg) override;
|
||||
int getErrno() override {
|
||||
@@ -181,10 +165,7 @@ class DrmMock : public Drm {
|
||||
int storedRetValForMinEUinPool = 0;
|
||||
int storedRetValForPersistant = 0;
|
||||
int storedRetValForVmCreate = 0;
|
||||
int storedPreemptionSupport =
|
||||
I915_SCHEDULER_CAP_ENABLED |
|
||||
I915_SCHEDULER_CAP_PRIORITY |
|
||||
I915_SCHEDULER_CAP_PREEMPTION;
|
||||
int storedPreemptionSupport = 0;
|
||||
int storedExecSoftPin = 0;
|
||||
int storedRetValForVmId = 1;
|
||||
int storedCsTimestampFrequency = 1000;
|
||||
|
||||
Reference in New Issue
Block a user