drm/vc4: Fix -ERESTARTSYS error return from BO waits.
authorEric Anholt <eric@anholt.net>
Mon, 25 Jan 2016 22:32:41 +0000 (14:32 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 16 Feb 2016 20:20:59 +0000 (12:20 -0800)
This caused the wait ioctls to claim that waiting had completed when
we actually got interrupted by a signal before it was done.  Fixes
broken rendering throttling that produced serious lag in X window
dragging.

Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/vc4/vc4_gem.c

index 3bf679d367a1347f90613097228f1e5a49442c9c..15619dbf34ca7773cb7091e50a048878443df8a9 100644 (file)
@@ -340,12 +340,10 @@ vc4_wait_for_seqno(struct drm_device *dev, uint64_t seqno, uint64_t timeout_ns,
        finish_wait(&vc4->job_wait_queue, &wait);
        trace_vc4_wait_for_seqno_end(dev, seqno);
 
-       if (ret && ret != -ERESTARTSYS) {
+       if (ret && ret != -ERESTARTSYS)
                DRM_ERROR("timeout waiting for render thread idle\n");
-               return ret;
-       }
 
-       return 0;
+       return ret;
 }
 
 static void