Mesa (master): vc4: Move global seqno short-circuiting to vc4_wait_seqno() .

Eric Anholt anholt at kemper.freedesktop.org
Sat Jan 10 00:57:12 UTC 2015


Module: Mesa
Branch: master
Commit: 1d044326774b20c4c685e54e976aa685963b870a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1d044326774b20c4c685e54e976aa685963b870a

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jan  7 15:15:22 2015 -0800

vc4: Move global seqno short-circuiting to vc4_wait_seqno().

Any other caller would want it, too.

---

 src/gallium/drivers/vc4/vc4_bufmgr.c |    3 +++
 src/gallium/drivers/vc4/vc4_fence.c  |    6 ------
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
index 34596be..8c5ee64 100644
--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
+++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
@@ -315,6 +315,9 @@ vc4_bo_flink(struct vc4_bo *bo, uint32_t *name)
 bool
 vc4_wait_seqno(struct vc4_screen *screen, uint64_t seqno, uint64_t timeout_ns)
 {
+        if (screen->finished_seqno >= seqno)
+                return true;
+
 #ifndef USE_VC4_SIMULATOR
         struct drm_vc4_wait_seqno wait;
         memset(&wait, 0, sizeof(wait));
diff --git a/src/gallium/drivers/vc4/vc4_fence.c b/src/gallium/drivers/vc4/vc4_fence.c
index 01906cd..f2ee91d 100644
--- a/src/gallium/drivers/vc4/vc4_fence.c
+++ b/src/gallium/drivers/vc4/vc4_fence.c
@@ -66,9 +66,6 @@ vc4_fence_signalled(struct pipe_screen *pscreen,
         struct vc4_screen *screen = vc4_screen(pscreen);
         struct vc4_fence *f = (struct vc4_fence *)pf;
 
-        if (screen->finished_seqno >= f->seqno)
-                return true;
-
         return vc4_wait_seqno(screen, f->seqno, 0);
 }
 
@@ -80,9 +77,6 @@ vc4_fence_finish(struct pipe_screen *pscreen,
         struct vc4_screen *screen = vc4_screen(pscreen);
         struct vc4_fence *f = (struct vc4_fence *)pf;
 
-        if (screen->finished_seqno >= f->seqno)
-                return true;
-
         return vc4_wait_seqno(screen, f->seqno, timeout_ns);
 }
 




More information about the mesa-commit mailing list