Dont initialize sysman for linux if Driver Model is not DRM

Related-To: LOCI-2533

Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
Jitendra Sharma
2021-09-30 12:38:56 +00:00
committed by Compute-Runtime-Automation
parent 7bc26e9f95
commit 135ec380fc
2 changed files with 24 additions and 0 deletions

View File

@@ -24,6 +24,9 @@ ze_result_t LinuxSysmanImp::init() {
pDevice = Device::fromHandle(pParentSysmanDeviceImp->hCoreDevice);
DEBUG_BREAK_IF(nullptr == pDevice);
NEO::OSInterface &OsInterface = pDevice->getOsInterface();
if (OsInterface.getDriverModel()->getDriverModelType() != NEO::DriverModelType::DRM) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
pDrm = OsInterface.getDriverModel()->as<NEO::Drm>();
int myDeviceFd = pDrm->getFileDescriptor();
std::string myDeviceName;