From 3bae3217d59bef7cc1694b228d1cc54043ff34bb Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 5 Jul 2024 20:52:53 +0200 Subject: [PATCH] etnaviv: drm: don't skip flush when there are active PMRs When there are active PMRs attached to the command buffer we can not optimize the flush away, as that results in the queries never reaching their expected sequence number, livelocking readers waiting for the query result. Fixes: 148658638e7f ("etnaviv: drm: Be able to mark end of context init") Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/etnaviv/drm/etnaviv_cmd_stream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/etnaviv/drm/etnaviv_cmd_stream.c b/src/etnaviv/drm/etnaviv_cmd_stream.c index 41d1fe01c95..93a7a87930d 100644 --- a/src/etnaviv/drm/etnaviv_cmd_stream.c +++ b/src/etnaviv/drm/etnaviv_cmd_stream.c @@ -230,7 +230,8 @@ void etna_cmd_stream_flush(struct etna_cmd_stream *stream, int in_fence_fd, if (gpu->dev->use_softpin) req.flags |= ETNA_SUBMIT_SOFTPIN; - if (stream->offset == priv->offset_end_of_context_init && !out_fence_fd) + if (stream->offset == priv->offset_end_of_context_init && !out_fence_fd && + !priv->submit.nr_pmrs) is_noop = true; if (likely(!is_noop)) {