[Intel-gfx] [PATCH 10/20] drm/i915: Watchdog timeout: DRM kernel interface enablement
Tomas Elf
tomas.elf at intel.com
Thu Oct 22 18:32:32 PDT 2015
Final enablement patch for GPU hang recovery using watchdog timeout.
Added execbuf flag for watchdog timeout in DRM kernel interface.
Signed-off-by: Tomas Elf <tomas.elf at intel.com>
---
drivers/gpu/drm/i915/intel_lrc.c | 6 ++----
include/uapi/drm/i915_drm.h | 5 ++++-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 30cd0ac..9d01fc3 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1160,10 +1160,6 @@ int intel_execlists_submission(struct i915_execbuffer_params *params,
u32 instp_mask;
int ret;
bool watchdog_running = false;
- /*
- * NB: Place-holder until watchdog timeout is enabled through DRM
- * execbuf interface
- */
bool enable_watchdog = false;
instp_mode = args->flags & I915_EXEC_CONSTANTS_MASK;
@@ -1201,6 +1197,8 @@ int intel_execlists_submission(struct i915_execbuffer_params *params,
if (ret)
return ret;
+ enable_watchdog = args->flags & I915_EXEC_ENABLE_WATCHDOG;
+
/* Start watchdog timer */
if (enable_watchdog) {
if (!intel_ring_supports_watchdog(ring))
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 67cebe6..79e6fc3 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -776,7 +776,10 @@ struct drm_i915_gem_execbuffer2 {
*/
#define I915_EXEC_RESOURCE_STREAMER (1<<15)
-#define __I915_EXEC_UNKNOWN_FLAGS -(I915_EXEC_RESOURCE_STREAMER<<1)
+/* Enable watchdog timer for this batch buffer */
+#define I915_EXEC_ENABLE_WATCHDOG (1<<16)
+
+#define __I915_EXEC_UNKNOWN_FLAGS -(I915_EXEC_ENABLE_WATCHDOG<<1)
#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
#define i915_execbuffer2_set_context_id(eb2, context) \
--
1.9.1
More information about the Intel-gfx
mailing list