Add ioctl helper function to check vm bind availability

Related-To: NEO-6591
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-02-15 09:33:27 +00:00
committed by Compute-Runtime-Automation
parent 964596e514
commit 12e2670b9a
14 changed files with 75 additions and 7 deletions

View File

@@ -201,8 +201,8 @@ DrmMockCustom::DrmMockCustom(RootDeviceEnvironment &rootDeviceEnvironment)
ioctl_expected.contextCreate = static_cast<int>(NEO::HwHelper::get(NEO::defaultHwInfo->platform.eRenderCoreFamily).getGpgpuEngineInstances(*NEO::defaultHwInfo).size());
ioctl_expected.contextDestroy = ioctl_expected.contextCreate.load();
createVirtualMemoryAddressSpace(NEO::HwHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()));
isVmBindAvailable();
setupIoctlHelper(rootDeviceEnvironment.getHardwareInfo()->platform.eProductFamily);
isVmBindAvailable();
reset();
}

View File

@@ -38,6 +38,7 @@ class DrmMockImpl : public Drm {
class DrmMockSuccess : public Drm {
public:
using Drm::setupIoctlHelper;
DrmMockSuccess(int fd, RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std::make_unique<HwDeviceIdDrm>(fd, mockPciPath), rootDeviceEnvironment) {}
int ioctl(unsigned long request, void *arg) override { return 0; };