Use ioctl helper when creating VM

Related-To: NEO-6999, NEO-6852
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-05-27 15:13:55 +00:00
committed by Compute-Runtime-Automation
parent e2991c3b13
commit 9938b4001d
19 changed files with 87 additions and 68 deletions

View File

@@ -92,6 +92,14 @@ int DrmMock::ioctl(DrmIoctl request, void *arg) {
}
}
if ((request == DrmIoctl::GemVmCreate) && (arg != nullptr)) {
ioctlCount.gemVmCreate++;
auto gemVmControl = static_cast<GemVmControl *>(arg);
receivedGemVmControl = *gemVmControl;
gemVmControl->vmId = ++latestCreatedVmId;
return storedRetValForVmCreate;
}
if ((request == DrmIoctl::GemContextDestroy) && (arg != nullptr)) {
ioctlCount.contextDestroy++;
auto destroy = static_cast<GemContextDestroy *>(arg);