Commit b1becb88 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Park the signaler before sleeping

If the signal to park arrives before we sleep, then we need to check
kthread_should_park() before sleeping to avoid missing the signal.
Otherwise, if the signal arrives whilst we are processing completed
requests, we will reset the current->state back to TASK_INTERRUPTIBLE
and so miss the wakeup.

Fixes: fe3288b5 ("drm/i915: Park the breadcrumbs signaler across a GPU reset")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170403105124.8969-1-chris@chris-wilson.co.ukReviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
parent 7a3ee5de
...@@ -629,6 +629,9 @@ static int intel_breadcrumbs_signaler(void *arg) ...@@ -629,6 +629,9 @@ static int intel_breadcrumbs_signaler(void *arg)
} else { } else {
DEFINE_WAIT(exec); DEFINE_WAIT(exec);
if (kthread_should_park())
kthread_parkme();
if (kthread_should_stop()) { if (kthread_should_stop()) {
GEM_BUG_ON(request); GEM_BUG_ON(request);
break; break;
...@@ -641,9 +644,6 @@ static int intel_breadcrumbs_signaler(void *arg) ...@@ -641,9 +644,6 @@ static int intel_breadcrumbs_signaler(void *arg)
if (request) if (request)
remove_wait_queue(&request->execute, &exec); remove_wait_queue(&request->execute, &exec);
if (kthread_should_park())
kthread_parkme();
} }
i915_gem_request_put(request); i915_gem_request_put(request);
} while (1); } while (1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment