[PATCH 5/6] 10s default fence timeout
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Jan 13 12:03:10 UTC 2021
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
drivers/gpu/drm/i915/Kconfig.profile | 8 ++++++++
drivers/gpu/drm/i915/gem/i915_gem_context.c | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/Kconfig.profile b/drivers/gpu/drm/i915/Kconfig.profile
index 35bbe2b80596..55e157ffff73 100644
--- a/drivers/gpu/drm/i915/Kconfig.profile
+++ b/drivers/gpu/drm/i915/Kconfig.profile
@@ -1,3 +1,11 @@
+config DRM_I915_REQUEST_TIMEOUT
+ int "Default timeout for requests (ms)"
+ default 10000 # milliseconds
+ help
+ ...
+
+ May be 0 to disable the timeout.
+
config DRM_I915_FENCE_TIMEOUT
int "Timeout for unsignaled foreign fences (ms, jiffy granularity)"
default 10000 # milliseconds
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index 5fe4ad1e1bee..ec415172bb00 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -861,6 +861,10 @@ i915_gem_create_context(struct drm_i915_private *i915, unsigned int flags)
intel_timeline_put(timeline);
}
+ /* Default expiry for user fences. */
+ ctx->watchdog.timeout_us = CONFIG_DRM_I915_REQUEST_TIMEOUT *
+ NSEC_PER_MSEC / NSEC_PER_USEC;
+
trace_i915_context_create(ctx);
return ctx;
--
2.27.0
More information about the Intel-gfx-trybot
mailing list