mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Don't use VM when ppGTT is invalid/unassigned
Signed-off-by: Jan Beich <jbeich@FreeBSD.org>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dd27f0ffa9
commit
bb6ed003e8
@@ -49,6 +49,10 @@ int Drm::createDrmVirtualMemory(uint32_t &drmVmId) {
|
||||
drm_i915_gem_vm_control ctl = {};
|
||||
auto ret = SysCalls::ioctl(getFileDescriptor(), DRM_IOCTL_I915_GEM_VM_CREATE, &ctl);
|
||||
if (ret == 0) {
|
||||
if (ctl.vm_id == 0) {
|
||||
// 0 is reserved for invalid/unassigned ppgtt
|
||||
return -1;
|
||||
}
|
||||
drmVmId = ctl.vm_id;
|
||||
}
|
||||
return ret;
|
||||
|
||||
@@ -65,6 +65,10 @@ int Drm::createDrmVirtualMemory(uint32_t &drmVmId) {
|
||||
drm_i915_gem_vm_control ctl = {};
|
||||
auto ret = SysCalls::ioctl(getFileDescriptor(), DRM_IOCTL_I915_GEM_VM_CREATE, &ctl);
|
||||
if (ret == 0) {
|
||||
if (ctl.vm_id == 0) {
|
||||
// 0 is reserved for invalid/unassigned ppgtt
|
||||
return -1;
|
||||
}
|
||||
drmVmId = ctl.vm_id;
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user