L0 Debugger - check debug_eu entry.

Related-To: NEO-7790
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2023-03-15 13:32:29 +00:00
committed by Compute-Runtime-Automation
parent 79075a3e92
commit 93a30f002b
9 changed files with 176 additions and 2 deletions

View File

@@ -824,7 +824,9 @@ bool Drm::sysmanQueryEngineInfo() {
}
bool Drm::isDebugAttachAvailable() {
return ioctlHelper->isDebugAttachAvailable();
int prelimEnableEuDebug = 0;
getPrelimEuDebug(prelimEnableEuDebug);
return (prelimEnableEuDebug == 1) && ioctlHelper->isDebugAttachAvailable();
}
int getMaxGpuFrequencyOfDevice(Drm &drm, std::string &sysFsPciPath, int &maxGpuFrequency) {
@@ -969,6 +971,20 @@ void Drm::getPrelimVersion(std::string &prelimVersion) {
ifs.close();
}
void Drm::getPrelimEuDebug(int &prelimEuDebug) {
prelimEuDebug = 0;
std::string sysFsPciPath = getSysFsPciPath();
std::string prelimEuDebugPath = sysFsPciPath + "/prelim_enable_eu_debug";
std::ifstream ifs(prelimEuDebugPath.c_str(), std::ifstream::in);
if (!ifs.fail()) {
ifs >> prelimEuDebug;
}
ifs.close();
}
int Drm::waitUserFence(uint32_t ctxId, uint64_t address, uint64_t value, ValueWidth dataWidth, int64_t timeout, uint16_t flags) {
return ioctlHelper->waitUserFence(ctxId, address, value, static_cast<uint32_t>(dataWidth), timeout, flags);
}

View File

@@ -135,6 +135,7 @@ class Drm : public DriverModel {
void setupSystemInfo(HardwareInfo *hwInfo, SystemInfo *sysInfo);
void setupCacheInfo(const HardwareInfo &hwInfo);
MOCKABLE_VIRTUAL void getPrelimVersion(std::string &prelimVersion);
MOCKABLE_VIRTUAL void getPrelimEuDebug(int &prelimEuDebug);
PhysicalDevicePciBusInfo getPciBusInfo() const override;
bool isGpuHangDetected(OsContext &osContext) override;