mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 12:11:31 +08:00
fix: Fix abort on device get state
Related-To: NEO-9980 Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c073106907
commit
1002cb9f34
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -165,6 +165,22 @@ uint32_t SysmanKmdInterface::getEventTypeImpl(std::string &dirName, const bool i
|
||||
return eventTypeVal;
|
||||
}
|
||||
|
||||
void SysmanKmdInterface::getWedgedStatusImpl(LinuxSysmanImp *pLinuxSysmanImp, zes_device_state_t *pState) {
|
||||
NEO::GemContextCreateExt gcc{};
|
||||
auto hwDeviceId = pLinuxSysmanImp->getSysmanHwDeviceIdInstance();
|
||||
auto pDrm = pLinuxSysmanImp->getDrm();
|
||||
// Device is said to be in wedged if context creation returns EIO.
|
||||
auto ret = pDrm->getIoctlHelper()->ioctl(NEO::DrmIoctl::gemContextCreateExt, &gcc);
|
||||
if (ret == 0) {
|
||||
pDrm->destroyDrmContext(gcc.contextId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pDrm->getErrno() == EIO) {
|
||||
pState->reset |= ZES_RESET_REASON_FLAG_WEDGED;
|
||||
}
|
||||
}
|
||||
|
||||
std::string SysmanKmdInterfaceI915::getBasePathI915(uint32_t subDeviceId) {
|
||||
return "gt/gt" + std::to_string(subDeviceId) + "/";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user