Skip to content

Commit

Permalink
drm/i915: Only call mod_timer() if not already pending
Browse files Browse the repository at this point in the history
The final arrangement of updating timer->expires and calling mod_timer()
used in

commit 672e7b7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Nov 19 09:47:19 2014 +0000

    drm/i915: Don't continually defer the hangcheck

turns out to be very unsafe. Try again.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Nov 20, 2014
1 parent bbd440f commit d9e600b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -3067,9 +3067,10 @@ void i915_queue_hangcheck(struct drm_device *dev)
return;

/* Don't continually defer the hangcheck, but make sure it is active */
if (!timer_pending(timer))
timer->expires = round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES);
mod_timer(timer, timer->expires);
if (timer_pending(timer))
return;
mod_timer(timer,
round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES));
}

static void ibx_irq_reset(struct drm_device *dev)
Expand Down

0 comments on commit d9e600b

Please sign in to comment.