path: root/include/uapi/drm/i915_drm.h
diff options
authorChris Wilson <>2017-08-11 11:57:31 +0100
committerChris Wilson <>2017-08-15 16:25:25 +0100
commitb805014897fd2d9e59f2a79ebe8c65a254234816 (patch)
tree90c507299bcf2f4f91d27cf4a493f40de2b80488 /include/uapi/drm/i915_drm.h
parentb8f55be64453ea77fc51bff6cd0d906d18ce1cd2 (diff)
drm/i915: Handle full s64 precision for wait-ioctl
The wait-ioctl is optionally supplied a timeout with nanosecond precision in a s64 field. We use nsecs_to_jiffies64() to convert that into the jiffies consumed by the scheduler, but internally nsecs_to_jiffies64() does not guard against overflow (as it's purpose is for use by the scheduler and not drivers!). So we must guard against the overflow ourselves, and in the process note that we may then return much earlier than the timeout selected by the user, so don't report ETIME unless we do hit the timeout. (Woe betold us though if the user waits for a year (32bit) and the request is still not complete!) v2: Refine overflow detection (to not include an overffow itself) Reported-by: Jason Ekstrand <> Signed-off-by: Chris Wilson <> Cc: Joonas Lahtinen <> Cc: Daniel Vetter <> Link: Reviewed-by: Joonas Lahtinen <>
Diffstat (limited to 'include/uapi/drm/i915_drm.h')
0 files changed, 0 insertions, 0 deletions