[PATCH 01/46] drm/i915: Warn if i915_drop_caches_set fails to quiesce
Chris Wilson
chris at chris-wilson.co.uk
Tue Feb 9 21:26:09 UTC 2021
Limit the wait to 60s, report a warning and return an error to userspace
if debugfs/i915_drop_caches_set fails to idle the GT. This should make
driver bugs more obvious as both a test failure and warning in dmesg
that includes the engine state leading to the driver bug. Or it will
catch IGT that try to flush excessive amount of works without cancelling
it first.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 51133b8fabb4..9835672b6bef 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -869,9 +869,13 @@ gt_drop_caches(struct intel_gt *gt, u64 val)
intel_gt_retire_requests(gt);
if (val & (DROP_IDLE | DROP_ACTIVE)) {
- ret = intel_gt_wait_for_idle(gt, MAX_SCHEDULE_TIMEOUT);
- if (ret)
+ ret = intel_gt_wait_for_idle(gt, 60 * HZ);
+ if (ret) {
+ drm_warn(>->i915->drm,
+ "GT failed to idle within 60s, aborting\n");
+ intel_gt_set_wedged(gt);
return ret;
+ }
}
if (val & DROP_IDLE) {
--
2.20.1
More information about the Intel-gfx-trybot
mailing list