From: Daniel Vetter Date: Thu, 4 Dec 2014 10:12:54 +0000 (+0100) Subject: drm/i915: compute wait_ioctl timeout correctly X-Git-Tag: omap-for-v3.20/drop-legacy-3517~77^2~2^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bd0e226e313547add65c7e4b0ecf65cb981a3c6;p=pandora-kernel.git drm/i915: compute wait_ioctl timeout correctly We've lost the +1 required for correct timeouts in commit 5ed0bdf21a85d78e04f89f15ccf227562177cbd9 Author: Thomas Gleixner Date: Wed Jul 16 21:05:06 2014 +0000 drm: i915: Use nsec based interfaces Use ktime_get_raw_ns() and get rid of the back and forth timespec conversions. Signed-off-by: Thomas Gleixner Acked-by: Daniel Vetter Signed-off-by: John Stultz So fix this up by reinstating our handrolled _timeout function. While at it bother with handling MAX_JIFFIES. v2: Convert to usecs (we don't care about the accuracy anyway) first to avoid overflow issues Dave Gordon spotted. v3: Drop the explicit MAX_JIFFY_OFFSET check, usecs_to_jiffies should take care of that already. It might be a bit too enthusiastic about it though. v4: Chris has a much nicer color, so use his implementation. This requires to export nsec_to_jiffies from time.c. Cc: Chris Wilson Cc: Dave Gordon Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82749 Cc: Thomas Gleixner Cc: John Stultz Signed-off-by: Daniel Vetter Acked-by: John Stultz Signed-off-by: Jani Nikula --- Reading git-diff-tree failed