Skip to content

Commit

Permalink
drm/i915: Immediately process a reset before starting waiting
Browse files Browse the repository at this point in the history
As we handoff the GPU reset to the waiter, we need to check we don't
miss a wakeup if it has already been sent prior to us starting the wait.

v2: Tweak checking for reset to be clear to the need before sleeping
after changing the task state.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-16-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
  • Loading branch information
Chris Wilson committed Feb 23, 2017
1 parent e070511 commit 24f417e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_gem_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,9 @@ long i915_wait_request(struct drm_i915_gem_request *req,
*/
goto wakeup;

if (flags & I915_WAIT_LOCKED)
__i915_wait_request_check_and_reset(req);

for (;;) {
if (signal_pending_state(state, current)) {
timeout = -ERESTARTSYS;
Expand Down

0 comments on commit 24f417e

Please sign in to comment.