mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Drm: call ioctl using ioctl helper if possible
Related-To: NEO-6999 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a8e2bd3f98
commit
b72fcad1be
@@ -61,14 +61,18 @@ class Ioctls {
|
||||
class DrmMockSuccess : public Drm {
|
||||
public:
|
||||
using Drm::setupIoctlHelper;
|
||||
DrmMockSuccess(int fd, RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std::make_unique<HwDeviceIdDrm>(fd, mockPciPath), rootDeviceEnvironment) {}
|
||||
DrmMockSuccess(int fd, RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std::make_unique<HwDeviceIdDrm>(fd, mockPciPath), rootDeviceEnvironment) {
|
||||
setupIoctlHelper(NEO::defaultHwInfo->platform.eProductFamily);
|
||||
}
|
||||
|
||||
int ioctl(DrmIoctl request, void *arg) override { return 0; };
|
||||
};
|
||||
|
||||
class DrmMockFail : public Drm {
|
||||
public:
|
||||
DrmMockFail(RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std::make_unique<HwDeviceIdDrm>(mockFd, mockPciPath), rootDeviceEnvironment) {}
|
||||
DrmMockFail(RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std::make_unique<HwDeviceIdDrm>(mockFd, mockPciPath), rootDeviceEnvironment) {
|
||||
setupIoctlHelper(NEO::defaultHwInfo->platform.eProductFamily);
|
||||
}
|
||||
|
||||
int ioctl(DrmIoctl request, void *arg) override { return -1; };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user