From b9e898ad8499dc4d11e0f14c1c2f7d18f4ebe5cb Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Mon, 6 May 2013 17:15:58 +0300 Subject: [PATCH] drm/i915: gem_wait_ioctl: make sure we return 0 remaining time for timeouts Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/i915_gem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index a1a282c..d9d5cdb 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1055,6 +1055,9 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno, case -ERESTARTSYS: /* Signal */ return (int)end; case 0: /* Timeout */ + if (timeout) + set_normalized_timespec(timeout, 0, 0); + return -ETIME; default: /* Completed */ WARN_ON(end < 0); /* We're not aware of other errors */ -- 1.7.10.4