Use PrelimHelper for isDebugAttachAvailable

Signed-off-by: Daniel Chabrowski daniel.chabrowski@intel.com
Related-To: NEO-6591
This commit is contained in:
Daniel Chabrowski
2022-03-25 18:51:25 +00:00
committed by Compute-Runtime-Automation
parent 08e3853982
commit 5350553f72
8 changed files with 34 additions and 14 deletions

View File

@@ -891,6 +891,10 @@ bool Drm::sysmanQueryEngineInfo() {
return Drm::queryEngineInfo(true);
}
bool Drm::isDebugAttachAvailable() {
return ioctlHelper->isDebugAttachAvailable();
}
int getMaxGpuFrequencyOfDevice(Drm &drm, std::string &sysFsPciPath, int &maxGpuFrequency) {
maxGpuFrequency = 0;
std::string clockSysFsPath = sysFsPciPath + "/gt_max_freq_mhz";

View File

@@ -9,10 +9,6 @@
namespace NEO {
bool Drm::isDebugAttachAvailable() {
return false;
}
bool Drm::hasPageFaultSupport() const {
return false;
}

View File

@@ -126,6 +126,7 @@ class IoctlHelper {
virtual int unregisterUuid(Drm *drm, uint32_t handle) = 0;
virtual bool isContextDebugSupported(Drm *drm) = 0;
virtual int setContextDebugFlag(Drm *drm, uint32_t drmContextId) = 0;
virtual bool isDebugAttachAvailable() = 0;
};
class IoctlHelperUpstream : public IoctlHelper {
@@ -178,6 +179,7 @@ class IoctlHelperUpstream : public IoctlHelper {
int unregisterUuid(Drm *drm, uint32_t handle) override;
bool isContextDebugSupported(Drm *drm) override;
int setContextDebugFlag(Drm *drm, uint32_t drmContextId) override;
bool isDebugAttachAvailable() override;
};
template <PRODUCT_FAMILY gfxProduct>
@@ -243,6 +245,7 @@ class IoctlHelperPrelim20 : public IoctlHelper {
int unregisterUuid(Drm *drm, uint32_t handle) override;
bool isContextDebugSupported(Drm *drm) override;
int setContextDebugFlag(Drm *drm, uint32_t drmContextId) override;
bool isDebugAttachAvailable() override;
};
} // namespace NEO

View File

@@ -550,4 +550,8 @@ int IoctlHelperPrelim20::setContextDebugFlag(Drm *drm, uint32_t drmContextId) {
return IoctlHelper::ioctl(drm, DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, &ctxParam);
}
bool IoctlHelperPrelim20::isDebugAttachAvailable() {
return true;
}
} // namespace NEO

View File

@@ -246,4 +246,8 @@ int IoctlHelperUpstream::setContextDebugFlag(Drm *drm, uint32_t drmContextId) {
return 0;
}
bool IoctlHelperUpstream::isDebugAttachAvailable() {
return false;
}
} // namespace NEO