etnaviv: reset no_wait_cnt after triggered flush
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 26 Jul 2019 10:32:40 +0000 (12:32 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sun, 5 Apr 2020 18:01:43 +0000 (18:01 +0000)
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>

src/gallium/drivers/etnaviv/etnaviv_query_acc.c

index c025ee7144a6b576e3e89a3dd620295abef1cda0..a1628534d277657c42a25da5e9e6e0040c86be4c 100644 (file)
@@ -177,8 +177,11 @@ etna_acc_get_query_result(struct etna_context *ctx, struct etna_query *q,
           * wait to flush unnecessarily but we also don't want to
           * spin forever.
           */
-         if (aq->no_wait_cnt++ > 5)
+         if (aq->no_wait_cnt++ > 5) {
             ctx->base.flush(&ctx->base, NULL, 0);
+            aq->no_wait_cnt = 0;
+         }
+
          return false;
       }