diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 820bc984082e..4a9faea626db 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1304,6 +1304,16 @@ int __i915_wait_seqno(struct intel_engine_cs *ring, u32 seqno, | |||
1304 | s64 tres = *timeout - (now - before); | 1304 | s64 tres = *timeout - (now - before); |
1305 | 1305 | ||
1306 | *timeout = tres < 0 ? 0 : tres; | 1306 | *timeout = tres < 0 ? 0 : tres; |
1307 | |||
1308 | /* | ||
1309 | * Apparently ktime isn't accurate enough and occasionally has a | ||
1310 | * bit of mismatch in the jiffies<->nsecs<->ktime loop. So patch | ||
1311 | * things up to make the test happy. We allow up to 1 jiffy. | ||
1312 | * | ||
1313 | * This is a regrssion from the timespec->ktime conversion. | ||
1314 | */ | ||
1315 | if (ret == -ETIME && *timeout < jiffies_to_usecs(1)*1000) | ||
1316 | *timeout = 0; | ||
1307 | } | 1317 | } |
1308 | 1318 | ||
1309 | return ret; | 1319 | return ret; |