diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-11-20 15:10:33 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-11-20 16:48:34 -0500 |
commit | d9e600b2e4a5e9f1dfe80cfcb453c8f5067a2a8a (patch) | |
tree | 9cf06c5c1cf26418cab22d0b7bed45c53cf482ca | |
parent | bbd440fb81338d8e8d58193867f1404c4e6cef7a (diff) |
drm/i915: Only call mod_timer() if not already pending
The final arrangement of updating timer->expires and calling mod_timer()
used in
commit 672e7b7c1849c904b2c55185906b3940843c55c6
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>
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 8d169e152d1e..5908580d7c15 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -3067,9 +3067,10 @@ void i915_queue_hangcheck(struct drm_device *dev) | |||
3067 | return; | 3067 | return; |
3068 | 3068 | ||
3069 | /* Don't continually defer the hangcheck, but make sure it is active */ | 3069 | /* Don't continually defer the hangcheck, but make sure it is active */ |
3070 | if (!timer_pending(timer)) | 3070 | if (timer_pending(timer)) |
3071 | timer->expires = round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES); | 3071 | return; |
3072 | mod_timer(timer, timer->expires); | 3072 | mod_timer(timer, |
3073 | round_jiffies_up(jiffies + DRM_I915_HANGCHECK_JIFFIES)); | ||
3073 | } | 3074 | } |
3074 | 3075 | ||
3075 | static void ibx_irq_reset(struct drm_device *dev) | 3076 | static void ibx_irq_reset(struct drm_device *dev) |