etnaviv: query: optimize context flushes

Same as the transfer flushes, the flushes caused by waiting for
a query result don't need to realize context external visibility
of resource changes and can thus be a bit more lightweight.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23557>
This commit is contained in:
Lucas Stach 2023-06-09 19:09:21 +02:00 committed by Marge Bot
parent 5ef6da21d9
commit 8e7d434b8c

View file

@ -125,14 +125,14 @@ etna_acc_get_query_result(struct etna_context *ctx, struct etna_query *q,
* spin forever.
*/
if (aq->no_wait_cnt++ > 5) {
ctx->base.flush(&ctx->base, NULL, 0);
etna_flush(&ctx->base, NULL, 0, true);
aq->no_wait_cnt = 0;
}
return false;
} else {
/* flush that GPU executes all query related actions */
ctx->base.flush(&ctx->base, NULL, 0);
etna_flush(&ctx->base, NULL, 0, true);
}
}