drm/i915: Align the hangcheck wakeup to the nearest second
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 5 Oct 2012 16:02:56 +0000 (17:02 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 8 Oct 2012 16:44:36 +0000 (18:44 +0200)
commitcecc21fea98cd18419e26a46e4e8123f55fead91
tree29c98612523c2369fbeb407d5538f0b0a9bf6676
parenta9627b881680c4419c61e70f60e8f957d8ef225c
drm/i915: Align the hangcheck wakeup to the nearest second

round_jiffies() aligns the wakeup time to the nearest second in order to
batch wakeups and reduce system load, which is useful for unimportant
coarse timers like our hangcheck.

v2: round_jiffies_relative() returns the relative jiffie value, whereas
we need the absolute value for the timer.

Suggested-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_irq.c