mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
Move createDrmVirtualMemory function to drm_neo.cpp
Related-To: NEO-6591 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7931fb8f9a
commit
b9d613995d
@@ -5,25 +5,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/sys_calls.h"
|
||||
|
||||
#include "drm_neo.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
bool Drm::isDebugAttachAvailable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user