From 18e31a9b311a6c1b35eedfae48d7512eea5be68d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 7 Feb 2019 08:41:29 -0800 Subject: [PATCH] iris: Fix accidental busy-looping in query waits When switching from bo_wait to sync-points, I missed that we turned an if (not landed) bo_wait into a while (not landed) check_syncpt(), which has a timeout of 0. This meant, rather than sleeping until the batch is complete, we'd busy-loop, continually asking the kernel "is the batch done yet???". This is not what we want at all - if we wanted a busy loop, we'd just loop on !snapshots_landed. We want to sleep. Add an effectively infinite timeout so that we sleep. --- src/gallium/drivers/iris/iris_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index 6e8062f3b4e..c5130bda36a 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -876,7 +876,7 @@ iris_get_query_result(struct pipe_context *ctx, while (!q->map->snapshots_landed) { if (wait) - iris_wait_syncpt(ctx->screen, q->syncpt, 0); + iris_wait_syncpt(ctx->screen, q->syncpt, INT64_MAX); else return false; } -- 2.30.2