mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:20:26 +08:00
Set context unrecoverable when debugging enabled
Related-To: NEO-6204 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
858727010f
commit
cf8e3269c7
@@ -377,6 +377,16 @@ void Drm::setNonPersistentContext(uint32_t drmContextId) {
|
||||
ioctl(DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, &contextParam);
|
||||
}
|
||||
|
||||
void Drm::setUnrecoverableContext(uint32_t drmContextId) {
|
||||
drm_i915_gem_context_param contextParam = {};
|
||||
contextParam.ctx_id = drmContextId;
|
||||
contextParam.param = I915_CONTEXT_PARAM_RECOVERABLE;
|
||||
contextParam.value = 0;
|
||||
contextParam.size = 0;
|
||||
|
||||
ioctl(DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM, &contextParam);
|
||||
}
|
||||
|
||||
uint32_t Drm::createDrmContext(uint32_t drmVmId, bool isSpecialContextRequested) {
|
||||
drm_i915_gem_context_create_ext gcc = {};
|
||||
|
||||
|
||||
@@ -164,6 +164,8 @@ class Drm : public DriverModel {
|
||||
bool isContextDebugSupported() { return contextDebugSupported; }
|
||||
MOCKABLE_VIRTUAL void setContextDebugFlag(uint32_t drmContextId);
|
||||
|
||||
void setUnrecoverableContext(uint32_t drmContextId);
|
||||
|
||||
void setDirectSubmissionActive(bool value) { this->directSubmissionActive = value; }
|
||||
bool isDirectSubmissionActive() { return this->directSubmissionActive; }
|
||||
|
||||
|
||||
@@ -53,8 +53,11 @@ void OsContextLinux::initializeContext() {
|
||||
drm.setNonPersistentContext(drmContextId);
|
||||
}
|
||||
|
||||
if (drm.getRootDeviceEnvironment().executionEnvironment.isDebuggingEnabled() && !isInternalEngine()) {
|
||||
drm.setContextDebugFlag(drmContextId);
|
||||
if (drm.getRootDeviceEnvironment().executionEnvironment.isDebuggingEnabled()) {
|
||||
drm.setUnrecoverableContext(drmContextId);
|
||||
if (!isInternalEngine()) {
|
||||
drm.setContextDebugFlag(drmContextId);
|
||||
}
|
||||
}
|
||||
|
||||
if (drm.isPreemptionSupported() && isLowPriority()) {
|
||||
|
||||
Reference in New Issue
Block a user