* [PATCH] drm/i915: Only call mod_timer() if not already pending
@ 2014-11-20 20:10 Chris Wilson
2014-11-20 21:49 ` Daniel Vetter
2014-11-22 20:20 ` [PATCH] drm/i915: Only call mod_timer() if not already shuang.he
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2014-11-20 20:10 UTC (permalink / raw)
To: intel-gfx; +Cc: Mika Kuoppala
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>
---
drivers/gpu/drm/i915/i915_irq.c | 7 ++++---
1 file 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)
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)
--
2.1.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Only call mod_timer() if not already pending
2014-11-20 20:10 [PATCH] drm/i915: Only call mod_timer() if not already pending Chris Wilson
@ 2014-11-20 21:49 ` Daniel Vetter
2014-11-22 20:20 ` [PATCH] drm/i915: Only call mod_timer() if not already shuang.he
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-11-20 21:49 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, Mika Kuoppala
On Thu, Nov 20, 2014 at 08:10:33PM +0000, Chris Wilson wrote:
> 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>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 7 ++++---
> 1 file 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)
> 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));
Oops. And that one now is before the merge, so no history rectifying.
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Only call mod_timer() if not already
2014-11-20 20:10 [PATCH] drm/i915: Only call mod_timer() if not already pending Chris Wilson
2014-11-20 21:49 ` Daniel Vetter
@ 2014-11-22 20:20 ` shuang.he
1 sibling, 0 replies; 3+ messages in thread
From: shuang.he @ 2014-11-22 20:20 UTC (permalink / raw)
To: shuang.he, intel-gfx, chris
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 367/367 367/367
ILK -5 373/375 368/375
SNB 450/450 450/450
IVB -1 502/503 501/503
BYT 289/289 289/289
HSW -3 567/567 564/567
BDW 417/417 417/417
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
ILK igt_kms_flip_absolute-wf_vblank DMESG_WARN(1, M26)PASS(3, M37M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_flip-vs-dpms DMESG_WARN(1, M26)PASS(2, M37M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_flip-vs-wf_vblank-interruptible DMESG_WARN(1, M26)PASS(1, M37) DMESG_WARN(1, M26)
ILK igt_kms_flip_wf_vblank-ts-check-interruptible DMESG_WARN(1, M26)PASS(2, M37M26) DMESG_WARN(1, M26)
ILK igt_kms_flip_wf_vblank-vs-modeset-interruptible PASS(3, M37M26) DMESG_WARN(1, M26)
IVB igt_gem_bad_reloc_negative-reloc-lut NSPT(3, M21M34M4)PASS(1, M21) NSPT(1, M34)
HSW igt_gem_bad_reloc_negative-reloc-lut NSPT(6, M40M20)PASS(1, M20) NSPT(1, M20)
HSW igt_kms_rotation_crc_primary-rotation PASS(7, M20M40) DMESG_WARN(1, M20)
HSW igt_pm_rc6_residency_rc6-accuracy PASS(7, M20M40) FAIL(1, M20)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-22 20:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 20:10 [PATCH] drm/i915: Only call mod_timer() if not already pending Chris Wilson
2014-11-20 21:49 ` Daniel Vetter
2014-11-22 20:20 ` [PATCH] drm/i915: Only call mod_timer() if not already shuang.he
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox