|
@@ -3286,7 +3286,7 @@ static unsigned long to_wait_timeout(s64 timeout_ns)
|
|
|
* -ERESTARTSYS: signal interrupted the wait
|
|
|
* -ENONENT: object doesn't exist
|
|
|
* Also possible, but rare:
|
|
|
- * -EAGAIN: GPU wedged
|
|
|
+ * -EAGAIN: incomplete, restart syscall
|
|
|
* -ENOMEM: damn
|
|
|
* -ENODEV: Internal IRQ fail
|
|
|
* -E?: The add request failed
|
|
@@ -3334,6 +3334,10 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
|
|
|
*/
|
|
|
if (ret == -ETIME && !nsecs_to_jiffies(args->timeout_ns))
|
|
|
args->timeout_ns = 0;
|
|
|
+
|
|
|
+ /* Asked to wait beyond the jiffie/scheduler precision? */
|
|
|
+ if (ret == -ETIME && args->timeout_ns)
|
|
|
+ ret = -EAGAIN;
|
|
|
}
|
|
|
|
|
|
i915_gem_object_put(obj);
|