public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Avoid uninterruptible spinning in debugfs
@ 2019-02-01 10:22 Chris Wilson
  2019-02-01 10:28 ` Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2019-02-01 10:22 UTC (permalink / raw)
  To: intel-gfx

If we get caught in a kernel bug, we may never idle. Let the user regain
control of their system^Wterminal by responding to SIGINT!

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index f3fa31d840f5..baf8b548621c 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -3947,6 +3947,10 @@ i915_drop_caches_set(void *data, u64 val)
 
 	if (val & DROP_IDLE) {
 		do {
+			if (signal_pending(current)) {
+				ret = -EINTR;
+				goto out;
+			}
 			if (READ_ONCE(i915->gt.active_requests))
 				flush_delayed_work(&i915->gt.retire_work);
 			drain_delayed_work(&i915->gt.idle_work);
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-02-01 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-01 10:22 [PATCH] drm/i915: Avoid uninterruptible spinning in debugfs Chris Wilson
2019-02-01 10:28 ` Chris Wilson
2019-02-01 10:52 ` Chris Wilson
2019-02-01 17:29   ` Tvrtko Ursulin
2019-02-01 17:32     ` Chris Wilson
2019-02-01 10:58 ` ✗ Fi.CI.BAT: failure for drm/i915: Avoid uninterruptible spinning in debugfs (rev2) Patchwork
2019-02-01 11:01 ` ✓ Fi.CI.BAT: success for drm/i915: Avoid uninterruptible spinning in debugfs Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox