mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix(sysman): Disable sysman API support with zeInit on xe
Related-To: NEO-8426 Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
023b5070fa
commit
39561aa7e9
@@ -140,6 +140,15 @@ SysmanDeviceImp *LinuxSysmanImp::getSysmanDeviceImp() {
|
||||
return pParentSysmanDeviceImp;
|
||||
}
|
||||
|
||||
ze_bool_t LinuxSysmanImp::isDriverModelSupported() {
|
||||
auto drmVersion = getDrm().getDrmVersion(getDrm().getFileDescriptor());
|
||||
if ("i915" == drmVersion) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static std::string modifyPathOnLevel(std::string realPciPath, uint8_t nLevel) {
|
||||
size_t loc;
|
||||
// we need to change the absolute path to 'nLevel' levels up
|
||||
|
||||
@@ -57,6 +57,7 @@ class LinuxSysmanImp : public OsSysman, NEO::NonCopyableOrMovableClass {
|
||||
Device *getDeviceHandle();
|
||||
std::vector<ze_device_handle_t> &getDeviceHandles() override;
|
||||
ze_device_handle_t getCoreDeviceHandle() override;
|
||||
ze_bool_t isDriverModelSupported() override;
|
||||
SysmanDeviceImp *getSysmanDeviceImp();
|
||||
std::string getPciCardBusDirectoryPath(std::string realPciPath);
|
||||
uint32_t getMemoryType();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -21,6 +21,7 @@ struct OsSysman {
|
||||
static OsSysman *create(SysmanDeviceImp *pSysmanImp);
|
||||
virtual std::vector<ze_device_handle_t> &getDeviceHandles() = 0;
|
||||
virtual ze_device_handle_t getCoreDeviceHandle() = 0;
|
||||
virtual ze_bool_t isDriverModelSupported() = 0;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
@@ -39,8 +39,10 @@ SysmanDevice *SysmanDeviceHandleContext::init(ze_device_handle_t coreDevice) {
|
||||
if (ZE_RESULT_SUCCESS != sysmanDevice->init()) {
|
||||
delete sysmanDevice;
|
||||
sysmanDevice = nullptr;
|
||||
sysmanInitFromCore = false;
|
||||
} else {
|
||||
sysmanInitFromCore = true;
|
||||
}
|
||||
sysmanInitFromCore = true;
|
||||
|
||||
L0::DeviceImp *device = static_cast<DeviceImp *>(Device::fromHandle(coreDevice));
|
||||
for (auto &subDevice : device->subDevices) {
|
||||
|
||||
@@ -106,6 +106,12 @@ ze_result_t SysmanDeviceImp::init() {
|
||||
updateSubDeviceHandlesLocally();
|
||||
|
||||
auto result = pOsSysman->init();
|
||||
if (result == ZE_RESULT_SUCCESS) {
|
||||
ze_bool_t driverModelSupported = pOsSysman->isDriverModelSupported();
|
||||
if (!driverModelSupported) {
|
||||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,11 @@ FirmwareUtil *WddmSysmanImp::getFwUtilInterface() {
|
||||
Device *WddmSysmanImp::getDeviceHandle() {
|
||||
return pDevice;
|
||||
}
|
||||
|
||||
ze_bool_t WddmSysmanImp::isDriverModelSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<ze_device_handle_t> &WddmSysmanImp::getDeviceHandles() {
|
||||
return pParentSysmanDeviceImp->deviceHandles;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ class WddmSysmanImp : public OsSysman, NEO::NonCopyableOrMovableClass {
|
||||
void releaseFwUtilInterface();
|
||||
std::vector<ze_device_handle_t> &getDeviceHandles() override;
|
||||
ze_device_handle_t getCoreDeviceHandle() override;
|
||||
ze_bool_t isDriverModelSupported() override;
|
||||
|
||||
protected:
|
||||
FirmwareUtil *pFwUtilInterface = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user